]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Revert "ITS#8847 more fallout from ldap_pvt_sockaddrstr move"
authorHoward Chu <hyc@openldap.org>
Sat, 27 Mar 2021 10:28:52 +0000 (10:28 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 27 Mar 2021 10:38:59 +0000 (10:38 +0000)
This reverts commit f2ddf89e3cbe2ba65728cfc7b4c022d72192f442.

Move Sockaddr def to ac/socket.h instead.

include/ac/socket.h
include/ldap_pvt.h
libraries/liblber/debug.c
libraries/libldap/ftest.c
libraries/liblutil/passwd.c
libraries/liblutil/sasl.c

index 2b669e9af740a3aababaed182096a6e0b806cdf8..f4ce3648e126c00ccc70b85436cdeb38e69cc196 100644 (file)
@@ -234,6 +234,18 @@ LDAP_LUTIL_F( int ) lutil_getpeereid( int s, uid_t *, gid_t * );
 #define        LUTIL_GETPEEREID( s, uid, gid, bv )     lutil_getpeereid( s, uid, gid )
 #endif
 
+typedef union Sockaddr {
+       struct sockaddr sa_addr;
+       struct sockaddr_in sa_in_addr;
+#ifdef LDAP_PF_INET6
+       struct sockaddr_storage sa_storage;
+       struct sockaddr_in6 sa_in6_addr;
+#endif
+#ifdef LDAP_PF_LOCAL
+       struct sockaddr_un sa_un_addr;
+#endif
+} Sockaddr;
+
 /* DNS RFC defines max host name as 255. New systems seem to use 1024 */
 #ifndef NI_MAXHOST
 #define        NI_MAXHOST      256
index adee63c84ad85c6582e0a0c0c6cda7913d2fe2c6..3e8ad8e976b56bd08ab6da23a3c9ba086d80c164 100644 (file)
@@ -178,22 +178,7 @@ ldap_pvt_get_hname LDAP_P((
 #define LDAP_IPADDRLEN sizeof("IP=255.255.255.255:65336")
 #endif
 
-struct sockaddr_in;
-struct sockaddr_in6;
-struct sockaddr_storage;
-struct sockaddr_un;
-
-typedef union Sockaddr {
-       struct sockaddr sa_addr;
-       struct sockaddr_in sa_in_addr;
-#ifdef LDAP_PF_INET6
-       struct sockaddr_storage sa_storage;
-       struct sockaddr_in6 sa_in6_addr;
-#endif
-#ifdef LDAP_PF_LOCAL
-       struct sockaddr_un sa_un_addr;
-#endif
-} Sockaddr;
+typedef union Sockaddr Sockaddr;
 
 LDAP_F (void)
 ldap_pvt_sockaddrstr LDAP_P((
index f133f80e4b807df11d393993c44ddbba318a6701..7d1f772ad3245ad43ef5e032b2adac66e1542ecc 100644 (file)
@@ -30,6 +30,7 @@
 #include "ldap_log.h"
 #include "ldap_defaults.h"
 #include "lber.h"
+#include "ldap_pvt.h"
 
 static FILE *log_file = NULL;
 static int debug_lastc = '\n';
index fd3c6a59054828c30f0c26e719e035f7af13d820..c0952b533c19af0706921d7994f20731c9e876df 100644 (file)
@@ -19,7 +19,6 @@
 #include <ac/stdlib.h>
 #include <ac/string.h>
 #include <ac/unistd.h>
-#include <ac/socket.h>
 
 #include <stdio.h>
 
index 379618f332ec1d2a248f073f2209cbded91533b1..eb92f1b2b1af83eb3e1b979876bc44dea69e79c3 100644 (file)
@@ -33,7 +33,6 @@
 #include <ac/string.h>
 #include <ac/unistd.h>
 #include <ac/param.h>
-#include <ac/socket.h>
 
 #ifdef SLAPD_CRYPT
 # include <ac/crypt.h>
index 9a71c2269de01d45ebedb2b7d9c0c027d2b1b0b8..e7531dd8c60efdfffc5a260d7801b0007a5d864b 100644 (file)
@@ -21,7 +21,6 @@
 #include <ac/stdlib.h>
 #include <ac/string.h>
 #include <ac/unistd.h>
-#include <ac/socket.h>
 
 #ifdef HAVE_SASL_SASL_H
 #include <sasl/sasl.h>