Revert "ITS#8847 more fallout from ldap_pvt_sockaddrstr move"

This reverts commit f2ddf89e3c.

Move Sockaddr def to ac/socket.h instead.
This commit is contained in:
Howard Chu 2021-03-27 10:28:52 +00:00
parent 3c62c94b32
commit bc0d62db23
6 changed files with 14 additions and 19 deletions

View 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

View 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((

View 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';

View File

@ -19,7 +19,6 @@
#include <ac/stdlib.h>
#include <ac/string.h>
#include <ac/unistd.h>
#include <ac/socket.h>
#include <stdio.h>

View 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>

View 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>