[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getaddrinfo: compilation error on OSF/1 5.1
From: |
Bruno Haible |
Subject: |
getaddrinfo: compilation error on OSF/1 5.1 |
Date: |
Mon, 12 Mar 2007 01:01:29 +0100 |
User-agent: |
KMail/1.5.4 |
Hi Simon,
On OSF/1 5.1, with cc as compiler, the getaddrinfo module fails to compile:
cc: Warning: getaddrinfo.c, line 334: In this declaration, parameter 2 has a
different type than specified in an earlier declaration of this function.
(mismatparam)
int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen,
----^
cc: Error: getaddrinfo.c, line 334: In this declaration, the type of
"getnameinfo" is not compatible with the type of a previous declaration of
"getnameinfo" at line number 290 in file /usr/include/netdb.h. (notcompat)
int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen,
----^
The reason is that <netdb.h> declares the functions as follows:
int getaddrinfo(
const char *nodename,
const char *servname,
const struct addrinfo *hints,
struct addrinfo **res);
int getnameinfo(
const struct sockaddr *sa,
socklen_t salen,
char *node,
size_t *nodelen,
char *serv,
size_t servlen,
int flags);
which is different from what getaddrinfo.c does.
Bruno
- getaddrinfo: compilation error on OSF/1 5.1,
Bruno Haible <=