Skip to content

Commit

Permalink
Fix memneq workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
runfalk committed Mar 17, 2019
1 parent 902ddaa commit 6515062
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions memneq.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6515062

Please sign in to comment.