From 5b2ecc5b827823be7f1c2977e9158f6b1462cdb0 Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Thu, 30 Dec 1999 16:09:17 +0000 Subject: [PATCH] Typedef socklen_t, if it is not available --- acinclude.m4 | 4 ++-- 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 -- 2.50.1