[PATCH] ws2_32: define IP_UNICAST_IF if not found on linux
Maarten Lankhorst
maarten.lankhorst at canonical.com
Sat Oct 27 05:39:59 CDT 2012
#define IP_UNICAST_IF 50 from linux/in.h is needed for Wine to support
binding to interfaces and support broadcast packets on that interface.
It appears that bits/in.h is manually merged with this file and that it
is inappropriate to include linux/in.h directly in user-space applications,
so define this ourselves if the headers don't define it.
See https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1065640
---
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 792ab1c..5c69d21 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -157,6 +157,9 @@
# include "wsnwlink.h"
#endif
+#if defined(linux) && !defined(IP_UNICAST_IF)
+#define IP_UNICAST_IF 50
+#endif
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
# define sipx_network sipx_addr.x_net
More information about the wine-patches
mailing list