[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Fix arpa_inet bugs found when installing coreutils 7.2 on Solari
From: |
Paul Eggert |
Subject: |
[PATCH] Fix arpa_inet bugs found when installing coreutils 7.2 on Solaris 8. |
Date: |
Thu, 02 Apr 2009 21:03:20 -0700 |
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 here
make[4]: *** [inet_ntop.o] Error 1
-----
* lib/arpa_inet.in.h (inet_ntop): Define to rpl_inet_ntop when
we implement it, to avoid colliding with Solaris 8's incompatible
declaration of the function (Solaris 8 lacks 'restrict').
(inet_pton): Likewise.
* modules/arpa_inet (arpa/inet.h): Depend on arpa_inet.in.h.
---
ChangeLog | 8 ++++++++
lib/arpa_inet.in.h | 8 ++++----
modules/arpa_inet | 2 +-
3 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9708976..5662328 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2009-04-02 Paul Eggert <address@hidden>
+ Fix bugs found when installing coreutils 7.2 on Solaris 8.
+
+ * lib/arpa_inet.in.h (inet_ntop): Define to rpl_inet_ntop when
+ we implement it, to avoid colliding with Solaris 8's incompatible
+ declaration of the function (Solaris 8 lacks 'restrict').
+ (inet_pton): Likewise.
+ * modules/arpa_inet (arpa/inet.h): Depend on arpa_inet.in.h.
+
* modules/fnmatch (Depends-on): Add mbsrtowcs, to fix a porting
problem to Solaris 8 encountered with coreutils 7.2, which
resulted in a message "fnmatch.c:292: warning: passing argument 4
diff --git a/lib/arpa_inet.in.h b/lib/arpa_inet.in.h
index 315d966..d7b79b5 100644
--- a/lib/arpa_inet.in.h
+++ b/lib/arpa_inet.in.h
@@ -43,7 +43,8 @@ extern "C" {
#endif
#if @GNULIB_INET_NTOP@
-# if address@hidden@
+# undef inet_ntop
+# define inet_ntop rpl_inet_ntop
/* Converts an internet address from internal format to a printable,
presentable format.
AF is an internet address family, such as AF_INET or AF_INET6.
@@ -61,7 +62,6 @@ extern "C" {
<http://www.opengroup.org/susv3xsh/inet_ntop.html>. */
extern const char *inet_ntop (int af, const void *restrict src,
char *restrict dst, socklen_t cnt);
-# endif
#elif defined GNULIB_POSIXCHECK
# undef inet_ntop
# define inet_ntop(af,src,dst,cnt) \
@@ -71,9 +71,9 @@ extern const char *inet_ntop (int af, const void *restrict
src,
#endif
#if @GNULIB_INET_PTON@
-# if address@hidden@
+# undef inet_pton
+# define inet_pton rpl_inet_pton
extern int inet_pton (int af, const char *restrict src, void *restrict dst);
-# endif
#elif defined GNULIB_POSIXCHECK
# undef inet_pton
# define inet_pton(af,src,dst) \
diff --git a/modules/arpa_inet b/modules/arpa_inet
index 3691fd5..d799403 100644
--- a/modules/arpa_inet
+++ b/modules/arpa_inet
@@ -19,7 +19,7 @@ BUILT_SOURCES += $(ARPA_INET_H)
# We need the following in order to create <arpa/inet.h> when the system
# doesn't have one.
-arpa/inet.h:
+arpa/inet.h: arpa_inet.in.h
@MKDIR_P@ arpa
rm -f address@hidden $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
--
1.6.2.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Fix arpa_inet bugs found when installing coreutils 7.2 on Solaris 8.,
Paul Eggert <=