diff options
-rw-r--r-- | acinclude.m4 | 4 | ||||
-rw-r--r-- | main/php.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 188659a555..b45ca77deb 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -117,8 +117,8 @@ socklen_t x; ],[ ac_cv_socklen_t=no ])) -if test "$ac_cv_socklen_t" = "no"; then - AC_DEFINE(socklen_t, unsigned int) +if test "$ac_cv_socklen_t" = "yes"; then + AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t]) fi ]) diff --git a/main/php.h b/main/php.h index a1ec7cba1d..1269bc1569 100644 --- a/main/php.h +++ b/main/php.h @@ -108,6 +108,10 @@ size_t strlcat(char *dst, const char *src, size_t siz); char *strtok_r(char *s, const char *delim, char **last); #endif +#ifndef HAVE_SOCKLEN_T +typedef unsigned int socklen_t; +#endif + #include "request_info.h" #if HAVE_LIBDL |