From 0d0ebd5a7f4c78cf5454ba5358bdb72e203db82e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 28 Jun 2012 12:47:54 +0200 Subject: [PATCH] libports: lwip change SOL_SOCKET definition Our FreeBSD libc based libc defines SOL_SOCKET as 0xffff. We change lwip's definition from 0xfff to match ours. This prevents us from converting the level when we call {g,s}etsockopt. Fixes #292. --- libports/ports/lwip.mk | 1 + libports/src/lib/lwip/sol_socket_definition.patch | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 libports/src/lib/lwip/sol_socket_definition.patch diff --git a/libports/ports/lwip.mk b/libports/ports/lwip.mk index c8cfa35dd..db789b82d 100644 --- a/libports/ports/lwip.mk +++ b/libports/ports/lwip.mk @@ -26,6 +26,7 @@ $(CONTRIB_DIR)/$(LWIP): $(DOWNLOAD_DIR)/$(LWIP_ZIP) $(VERBOSE)unzip $< -d $(CONTRIB_DIR) && touch $@ $(VERBOSE)patch -d $(CONTRIB_DIR) -p0 -i ../src/lib/lwip/libc_select_notify.patch $(VERBOSE)patch -d $(CONTRIB_DIR) -p0 -i ../src/lib/lwip/errno.patch + $(VERBOSE)patch -d $(CONTRIB_DIR) -p0 -i ../src/lib/lwip/sol_socket_definition.patch include/lwip/lwip: $(VERBOSE)mkdir -p $@ diff --git a/libports/src/lib/lwip/sol_socket_definition.patch b/libports/src/lib/lwip/sol_socket_definition.patch new file mode 100644 index 000000000..c8f71606c --- /dev/null +++ b/libports/src/lib/lwip/sol_socket_definition.patch @@ -0,0 +1,15 @@ +Our FreeBSD libc based libc defines SOL_SOCKET as 0xffff. We change +lwip's definition from 0xfff to match ours. This prevents us from +converting the level when we call {g,s}etsockopt. + +--- lwip-1.3.2.orig/src/include/lwip/sockets.h ++++ lwip-1.3.2/src/include/lwip/sockets.h +@@ -113,7 +113,7 @@ struct linger { + /* + * Level number for (get/set)sockopt() to apply to socket itself. + */ +-#define SOL_SOCKET 0xfff /* options for socket level */ ++#define SOL_SOCKET 0xffff /* options for socket level */ + + + #define AF_UNSPEC 0