summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/s-templ.h5
-rwxr-xr-xconfigure5
2 files changed, 10 insertions, 0 deletions
diff --git a/config/s-templ.h b/config/s-templ.h
index 7b0635b43..daaf540f2 100644
--- a/config/s-templ.h
+++ b/config/s-templ.h
@@ -72,6 +72,11 @@
/* Define HAS_SOCKETS if you have BSD sockets. */
+#define HAS_SOCKLEN_T
+
+/* Define HAS_SOCKLEN_T if the type socklen_t is defined in
+ /usr/include/sys/socket.h. */
+
#define HAS_UNISTD
/* Define HAS_UNISTD if you have /usr/include/unistd.h. */
diff --git a/configure b/configure
index 0e467e446..a9f55bc44 100755
--- a/configure
+++ b/configure
@@ -481,6 +481,11 @@ elif sh ./hasgot -lnsl -lsocket socket socketpair bind listen accept connect; th
has_sockets=yes
fi
+if sh ./hasgot -i sys/socket.h -t socklen_t; then
+ echo "socklen_t is defined in <sys/socket.h>"
+ echo "#define HAS_SOCKLEN_T" >> s.h
+fi
+
if sh ./hasgot -i unistd.h; then
echo "unistd.h found."
echo "#define HAS_UNISTD" >> s.h