[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix arpa_inet bugs found when installing coreutils 7.2 on So
Re: [PATCH] Fix arpa_inet bugs found when installing coreutils 7.2 on Solaris 8.
Fri, 3 Apr 2009 13:27:06 +0200
> I installed the following patch to gnulib, to fix the following
> symptoms when trying to build coreutils 7.2 on Solaris 8:
> inet_ntop.c:73: error: conflicting types for 'inet_ntop'
> /usr/include/arpa/inet.h:55: error: previous declaration of 'inet_ntop' was
> make: *** [inet_ntop.o] Error 1
The assumption in the 'inet_ntop' module is that if a platform provides the
inet_ntop function, it declares it, and vice versa. This is true for Solaris 8.
The actual problem is that Solaris 8 defines this function in libnsl, but
the code in m4/arpa_inet.m4:
expects to see this function in libc.
There is no point for gnulib to redefine a function that is present in libnsl
(and hopefully working). IMO the fix is therefore to add a 'Link' section to
the module description module/inet_ntop, and determine its value, say,
INET_NTOP_LIB, in the gl_INET_NTOP macro.
Btw, your patch was incomplete:
1) It does the redefinition
#define inet_ntop rpl_inet_ntop
unconditionally, also on platforms on which the inet_ntop function exists
in libc and is not replaced by m4/inet_ntop.m4. This will lead to link
The fix would have been to add a
2) When you removed the address@hidden@ conditional, the definition
of this macro in m4/inet_ntop.m4, m4/arpa_inet_h.m4, modules/arpa_inet
could also be removed.