Patch - check for msghdr.msg_control on Sparc-Solaris
Warren_Baird at cimmetry.com
Warren_Baird at cimmetry.com
Thu May 16 11:14:39 CDT 2002
ChangeLog:
- added a test for the msg_control field in struct msghdr
(does't appear in sparc-solaris)
Wordier Description:
This is the first part of a series of five patches needed to get wine
compiled on sparc-solaris, and some of the provided applications to
compile and run.
I've verified that wine compiles with all five patches applied under
linux-x86 and that the basics still work...
Warren Baird : Warren_Baird at cimmetry.com
diff -ur clean/wine-20020509/configure.ac wine-20020509/configure.ac
--- clean/wine-20020509/configure.ac Thu May 9 21:33:41 2002
+++ wine-20020509/configure.ac Thu May 16 10:28:35 2002
@@ -1176,6 +1176,13 @@
#include <sys/socket.h>],
[AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS, 1, [Define if struct msghdr contains
msg_accrights])])
+dnl Check for msg control fields in msghdr
+WINE_CHECK_STRUCT_MEMBER(msghdr,msg_control,
+[#include <sys/types.h>
+#include <sys/socket.h>],
+ [AC_DEFINE(HAVE_MSGHDR_MSGCTRL, 1, [Define if struct msghdr contains
msg_control])])
+
+
dnl Check for the sa_len member in struct sockaddr
WINE_CHECK_STRUCT_MEMBER(sockaddr,sa_len,
[#include <sys/types.h>
diff -ur clean/wine-20020509/include/config.h.in
wine-20020509/include/config.h.in
--- clean/wine-20020509/include/config.h.in Thu May 9 21:33:41 2002
+++ wine-20020509/include/config.h.in Thu May 16 10:30:24 2002
@@ -293,6 +293,9 @@
/* Define if struct msghdr contains msg_accrights */
#undef HAVE_MSGHDR_ACCRIGHTS
+/* Define if struct msghdr contains msg_control */
+#undef HAVE_MSGHDR_MSGCTRL
+
/* Define to 1 if you have the <ncurses.h> header file. */
#undef HAVE_NCURSES_H
diff -ur clean/wine-20020509/dlls/winsock/socket.c
wine-20020509/dlls/winsock/socket.c
--- clean/wine-20020509/dlls/winsock/socket.c Fri Apr 26 21:05:35 2002
+++ wine-20020509/dlls/winsock/socket.c Thu May 16 10:34:37 2002
@@ -1141,10 +1141,11 @@
hdr.msg_iov = iov;
hdr.msg_iovlen = count;
+#ifdef HAVE_MSGHDR_MSGCTRL
hdr.msg_control = NULL;
hdr.msg_controllen = 0;
hdr.msg_flags = 0;
-
+#endif
if ( (n = recvmsg (fd, &hdr, *lpFlags)) == -1 )
{
TRACE ( "recvmsg error %d\n", errno);
@@ -1245,9 +1246,11 @@
hdr.msg_iov = iov;
hdr.msg_iovlen = count;
+#ifdef HAVE_MSGHDR_MSGCTRL
hdr.msg_control = NULL;
hdr.msg_controllen = 0;
hdr.msg_flags = 0;
+#endif
n = sendmsg (fd, &hdr, dwFlags);
More information about the wine-patches
mailing list