diff --git a/configure b/configure index 3ca37502b6e..58dbf88d7e5 100755 --- a/configure +++ b/configure @@ -17462,6 +17462,69 @@ cat >>confdefs.h <<_ACEOF _ACEOF +fi +echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +if test "${ac_cv_type_socklen_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((socklen_t *) 0) + return 0; +if (sizeof (socklen_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_socklen_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_socklen_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 +echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 +if test $ac_cv_type_socklen_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_SOCKLEN_T 1 +_ACEOF + + fi echo "$as_me:$LINENO: checking for long long" >&5 echo $ECHO_N "checking for long long... $ECHO_C" >&6 diff --git a/configure.ac b/configure.ac index ea52dee2031..71467ab70ad 100644 --- a/configure.ac +++ b/configure.ac @@ -1264,7 +1264,7 @@ dnl **** Check for types **** AC_C_CONST AC_C_INLINE -AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, long long, fsblkcnt_t, fsfilcnt_t]) +AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, socklen_t, long long, fsblkcnt_t, fsfilcnt_t]) AC_CACHE_CHECK([whether linux/input.h is for real], wine_cv_linux_input_h, diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c index 11f7867ca9b..217ef1b4c0b 100644 --- a/dlls/wininet/cookie.c +++ b/dlls/wininet/cookie.c @@ -21,6 +21,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/wininet/dialogs.c b/dlls/wininet/dialogs.c index 9187ed8f3df..abfcc569c72 100644 --- a/dlls/wininet/dialogs.c +++ b/dlls/wininet/dialogs.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 19a6ed1de9a..859f13c00b2 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -26,6 +26,7 @@ */ #include "config.h" +#include "wine/port.h" #include #ifdef HAVE_SYS_SOCKET_H diff --git a/dlls/wininet/urlcache.c b/dlls/wininet/urlcache.c index b153ed66a1f..2a110507116 100644 --- a/dlls/wininet/urlcache.c +++ b/dlls/wininet/urlcache.c @@ -24,6 +24,7 @@ #define COM_NO_WINDOWS_H #include "config.h" +#include "wine/port.h" #include #include diff --git a/dlls/wininet/utility.c b/dlls/wininet/utility.c index e6415868744..e2f56c7adb3 100644 --- a/dlls/wininet/utility.c +++ b/dlls/wininet/utility.c @@ -23,6 +23,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/include/config.h.in b/include/config.h.in index a48aef5e565..56339e4f229 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -524,6 +524,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SOCKET_H +/* Define to 1 if the system has the type `socklen_t'. */ +#undef HAVE_SOCKLEN_T + /* Define to 1 if you have the header file. */ #undef HAVE_SOUNDCARD_H diff --git a/include/wine/port.h b/include/wine/port.h index b4b1a26c440..73288de614f 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -61,6 +61,9 @@ typedef int pid_t; #ifndef HAVE_SIZE_T typedef unsigned int size_t; #endif +#ifndef HAVE_SOCKLEN_T +typedef unsigned int socklen_t; +#endif #ifndef HAVE_SSIZE_T typedef int ssize_t; #endif