https://bugs.openldap.org/show_bug.cgi?id=9659

          Issue ID: 9659
           Summary: slapd fails to compile with LDAP_PF_LOCAL_SENDMSG:
                    redefinition of 'peerbv'
           Product: OpenLDAP
           Version: 2.5.7
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: needs_review
          Severity: normal
          Priority: ---
         Component: slapd
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Thanks for fixing issue 9658. The same test environment (Debian GNU/Hurd 11.0)
now fails to compile slapd (RE25 and master):

cc -g -O2 -I../../include -I. -I./slapi -I. -I../../include       -c -o
daemon.o daemon.c
daemon.c: In function 'slap_listener':
daemon.c:2113:16: error: redefinition of 'peerbv'
 2113 |  struct berval peerbv = BER_BVNULL;
      |                ^~~~~~
daemon.c:2110:16: note: previous definition of 'peerbv' was here
 2110 |  struct berval peerbv = BER_BVC(peername);
      |                ^~~~~~
<builtin>: recipe for target 'daemon.o' failed
make[2]: *** [daemon.o] Error 1

The relevant code in daemon.c:

        char peername[LDAP_IPADDRLEN];
        struct berval peerbv = BER_BVC(peername);
#ifdef LDAP_PF_LOCAL_SENDMSG
        char peerbuf[8];
        struct berval peerbv = BER_BVNULL;
#endif

When LDAP_PF_LOCAL_SENDMSG is defined, the variable 'peerbv' is declared twice.

-- 
You are receiving this mail because:
You are on the CC list for the issue.

Reply via email to