[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#4537) Compilation failure on OSF1 v5.1



Full_Name: Gordon Lack
Version: 2.3.21
OS: OSF1 v5.1
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (193.128.25.20)


The compilation of servers/slapd/daemon.c fails with:

cc: Error: daemon.c, line 809: In this statement, a common type 
  could not be determined for the 2nd and 3rd operands 
  ("he->h_addr_list[i]" and "&in") of a conditional operator. (badcondit)
                        AC_MEMCPY( &((struct sockaddr_in *)sap[i])->sin_addr,

------------------------^

   The problem is "he->h_addr_list[i]" is char * while "&in" is struct in_addr
*.

   The simple fix is to cast the former (whose type may depend on system include
file definitions) to the known type of teh latter.

810c810
<    he ? he->h_addr_list[i] : &in, sizeof(struct in_addr) );
---
>    he ? (struct in_addr *)he->h_addr_list[i] : &in, sizeof(struct in_addr) );