]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Define SOCKLEN_T for old versions of O.S. that don't have socklen_t.
authorTed Lemon <source@isc.org>
Sat, 5 Feb 2000 17:40:18 +0000 (17:40 +0000)
committerTed Lemon <source@isc.org>
Sat, 5 Feb 2000 17:40:18 +0000 (17:40 +0000)
includes/cf/freebsd.h
includes/cf/netbsd.h
includes/cf/openbsd.h

index 47752c20efeefae227895b5b848b6f8833c7b2f9..c9e637fc2a802be7618a175d9201267ff12675ba 100644 (file)
@@ -72,6 +72,16 @@ extern int h_errno;
 
 #define HAVE_SA_LEN
 
+/* socklen_t was first defined on November 24 in sys/socket.h, and
+   __FreeBSD_version was changed to 400013 on December 4, so if you
+   get a compile error on this, and you updated between those dates,
+   that's why.   Also, it may be that some 3.x version after 3.4 will
+   have socklen_t, but no such change has been made so far. */
+
+#if  __FreeBSD_version < 400013
+#define SOCKLEN_T int
+#endif
+
 #if defined (USE_DEFAULT_NETWORK)
 #  define USE_BPF
 #endif
index 1173786676a0226fbd9b6230f57749402aa32e3d..7a0b49fd349928dfa007d65ca98395218c4b4cf6 100644 (file)
@@ -80,6 +80,11 @@ extern int h_errno;
 #define PTRSIZE_64BIT
 #endif
 
+/* NetBSD added socklen_t in 1.3J, just prior to the 1.4 release. */
+#if __NetBSD_Version__ > 103090000
+#define SOCKLEN_T int
+#endif
+
 #ifdef NEED_PRAND_CONF
 /* prand_conf.h goop - remove when BIND 9 comes around. */
 #ifndef HAVE_DEV_RANDOM
index 5e855b89d0519183da2272c5ba6f20eabaa1e6c2..9adeb198774ae3c28f93dd24aa2e37ee0aa483fc 100644 (file)
@@ -80,6 +80,11 @@ extern int h_errno;
 #define PTRSIZE_64BIT
 #endif
 
+/* socklen_t first used right around the time 2.5 branched, it looks like. */
+#if OpenBSD < 199905
+#define SOCKLEN_T int
+#endif
+
 #ifdef NEED_PRAND_CONF
 #ifndef HAVE_DEV_RANDOM
  # define HAVE_DEV_RANDOM 1