[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] Handle alternative getnameinfo() prototype

From: Paul Eggert
Subject: Re: [patch] Handle alternative getnameinfo() prototype
Date: Mon, 18 Sep 2006 11:44:34 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Petter Reinholdtsen <address@hidden> writes:

> To get coreutils 6.1 to build on Tru64 Unix, in addition to the minor
> typo reported earlier, I had to change the prototype used for
> getnameinfo() to match the on in /usr/include/netdb.h....
> The problem was that the selected prototype used size_t instead of
> socklen_t for salen, nodelen and servicelen.  An alternative prototype
> in the header (not used in this build) used socklen for salen, and
> size_t for nodelen and servicelen.

Thanks for reporting this.  Does the following patch solve the
problem?  It's a bit less ugly than the one you sent in, and should
work even with the alternative prototypes.

It's a bit weird, though, that Tru64 has getnameinfo declared but
getaddrinfo is not defined.  Is that correct, or am I missing

2006-09-18  Paul Eggert  <address@hidden>

        * getaddrinfo.h (getnameinfo)
        Define to rpl_getnameinfo, to work around a Tru64 porting bug
        reported by Petter Reinholdtsen.

--- getaddrinfo.h.~1.18.~       2006-07-22 03:13:57.000000000 -0700
+++ getaddrinfo.h       2006-09-18 11:38:16.000000000 -0700
@@ -133,7 +133,12 @@ extern void freeaddrinfo (struct addrinf
 extern const char *gai_strerror (int ecode);
+   /* Work around incompatible decls in Tru64 <netdb.h>.  */
+#  define getnameinfo rpl_getnameinfo
+# endif
 /* Convert socket address to printable node and service names.
    For more details, see the POSIX:2001 specification
    <http://www.opengroup.org/susv3xsh/getnameinfo.html>.  */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]