Fix memneq workaround

This commit is contained in:
Andreas Runfalk 2019-03-17 17:05:50 +01:00
parent 902ddaa491
commit 6515062c4d
2 changed files with 14 additions and 2 deletions

View File

@ -38,8 +38,7 @@ $(WIREGUARD_TAR):
# use memneq implementation as it doesn't appear to be included on the D218j.
$(WIREGUARD_DIR)/src/Makefile: $(WIREGUARD_TAR)
tar -xf $(WIREGUARD_TAR)
echo 'ccflags-y += -include $(kbuild-dir)/compat/memneq/include.h' >> $(WIREGUARD_DIR)/src/compat/Kbuild.include
echo 'wireguard-y += compat/memneq/memneq.o' >> $(WIREGUARD_DIR)/src/compat/Kbuild.include
patch $(WIREGUARD_DIR)/src/compat/Kbuild.include $(ROOT_DIR)/memneq.patch
# Build the wg command line tool
$(WG_TARGET): $(LIBMNL_DIR)/src/.libs/libmnl.a $(WIREGUARD_DIR)/src/Makefile

13
memneq.patch Normal file
View File

@ -0,0 +1,13 @@
--- Kbuild.include 2019-03-17 16:02:33.388208274 +0000
+++ Kbuild.include 2019-03-17 16:02:45.951895692 +0000
@@ -42,10 +42,8 @@
wireguard-y += compat/udp_tunnel/udp_tunnel.o
endif
-ifeq ($(shell grep -s -F "int crypto_memneq" "$(srctree)/include/crypto/algapi.h"),)
ccflags-y += -include $(kbuild-dir)/compat/memneq/include.h
wireguard-y += compat/memneq/memneq.o
-endif
ifeq ($(wildcard $(srctree)/arch/arm/include/asm/neon.h)$(CONFIG_ARM),y)
ccflags-y += -I$(src)/compat/neon-arm/include