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