]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9790 Fix build with old GCC
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>
Tue, 25 Jan 2022 15:29:49 +0000 (17:29 +0200)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 2 Feb 2022 17:11:25 +0000 (17:11 +0000)
Versions 4.1 and 4.3 show the following error:

In file included from ../../include/lutil.h:21,
                 from passwd.c:60:
../../include/ac/socket.h:247: error: redefinition of typedef 'Sockaddr'
../../include/ldap_pvt.h:188: error: previous declaration of 'Sockaddr' was here

include/ldap_pvt.h

index 27a5afd2351db0055dcb47d6cf259c0eb523f0db..ba6ec152c675931e122b2265e0e604d6b2141568 100644 (file)
@@ -185,11 +185,11 @@ ldap_pvt_get_hname LDAP_P((
 #define LDAP_IPADDRLEN sizeof("IP=255.255.255.255:65336")
 #endif
 
-typedef union Sockaddr Sockaddr;
+union Sockaddr;
 
 LDAP_F (void)
 ldap_pvt_sockaddrstr LDAP_P((
-       Sockaddr *sa,
+       union Sockaddr *sa,
        struct berval * ));