All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] inetutils_1.8.bb: Fix build when DISTRO_FEATURES lacks ipv6.
@ 2010-12-02  0:35 Graham Gower
  0 siblings, 0 replies; only message in thread
From: Graham Gower @ 2010-12-02  0:35 UTC (permalink / raw)
  To: openembedded-devel

In file included from ./ping.h:19:0,
                 from ping_address.c:47:
./ping_common.h:23:27: fatal error: netinet/icmp6.h: No such file or directory
compilation terminated.
In file included from ./ping.h:19:0,
                 from ping_router.c:46:
./ping_common.h:23:27: fatal error: netinet/icmp6.h: No such file or directory
compilation terminated.
make[2]: *** [ping_address.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [ping_router.o] Error 1
In file included from ping_common.c:32:0:
ping_common.h:23:27: fatal error: netinet/icmp6.h: No such file or directory
compilation terminated.
make[2]: *** [ping_common.o] Error 1
In file included from ping.h:19:0,
                 from libping.c:38:
ping_common.h:23:27: fatal error: netinet/icmp6.h: No such file or directory
compilation terminated.
make[2]: *** [libping.o] Error 1
In file included from ./ping.h:19:0,
                 from ping_timestamp.c:46:
./ping_common.h:23:27: fatal error: netinet/icmp6.h: No such file or directory
compilation terminated.
make[2]: *** [ping_timestamp.o] Error 1
In file included from ./ping.h:19:0,
                 from ping_echo.c:47:
./ping_common.h:23:27: fatal error: netinet/icmp6.h: No such file or directory
compilation terminated.
make[2]: *** [ping_echo.o] Error 1
In file included from ./ping.h:19:0,
                 from ping.c:49:
./ping_common.h:23:27: fatal error: netinet/icmp6.h: No such file or directory
compilation terminated.
make[2]: *** [ping.o] Error 1

Signed-off-by: Graham Gower <graham.gower@gmail.com>
---
 .../inetutils/inetutils-1.8/fix-disable-ipv6.patch |   58 ++++++++++++++++++++
 recipes/inetutils/inetutils_1.8.bb                 |    6 ++-
 2 files changed, 63 insertions(+), 1 deletions(-)
 create mode 100644 recipes/inetutils/inetutils-1.8/fix-disable-ipv6.patch

diff --git a/recipes/inetutils/inetutils-1.8/fix-disable-ipv6.patch b/recipes/inetutils/inetutils-1.8/fix-disable-ipv6.patch
new file mode 100644
index 0000000..75d51a1
--- /dev/null
+++ b/recipes/inetutils/inetutils-1.8/fix-disable-ipv6.patch
@@ -0,0 +1,58 @@
+Upstream: http://www.mail-archive.com/bug-inetutils@gnu.org/msg02103.html
+
+diff -ur inetutils-1.8.orig/ping/ping_common.h inetutils-1.8/ping/ping_common.h
+--- inetutils-1.8.orig/ping/ping_common.h	2010-05-15 20:55:47.000000000 +0930
++++ inetutils-1.8/ping/ping_common.h	2010-12-01 12:19:08.000000000 +1030
+@@ -17,10 +17,14 @@
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see `http://www.gnu.org/licenses/'. */
+ 
++#include <config.h>
++
+ #include <netinet/in_systm.h>
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
++#ifdef HAVE_IPV6
+ #include <netinet/icmp6.h>
++#endif
+ #include <icmp.h>
+ #include <error.h>
+ #include <progname.h>
+@@ -66,13 +70,19 @@
+   (t).tv_usec = ((i)%PING_PRECISION)*(1000000/PING_PRECISION) ;\
+ } while (0)
+ 
++#ifdef HAVE_IPV6
+ /* Not sure about this step*/
+ #define _PING_BUFLEN(p, USE_IPV6) ((USE_IPV6)? ((p)->ping_datalen + sizeof (struct icmp6_hdr)) : \
+ 				   ((p)->ping_datalen + sizeof (icmphdr_t)))
++#else
++#define _PING_BUFLEN(p, USE_IPV6) ((p)->ping_datalen + sizeof (icmphdr_t))
++#endif
+ 
++#ifdef HAVE_IPV6
+ typedef int (*ping_efp6) (int code, void *closure, struct sockaddr_in6 * dest,
+ 			  struct sockaddr_in6 * from, struct icmp6_hdr * icmp,
+ 			  int datalen);
++#endif
+ 
+ typedef int (*ping_efp) (int code,
+ 			 void *closure,
+@@ -81,13 +91,17 @@
+ 			 struct ip * ip, icmphdr_t * icmp, int datalen);
+ 
+ union event {
++#ifdef HAVE_IPV6
+   ping_efp6 handler6;
++#endif
+   ping_efp handler;
+ };
+ 
+ union ping_address {
+   struct sockaddr_in ping_sockaddr;
++#ifdef HAVE_IPV6
+   struct sockaddr_in6 ping_sockaddr6;
++#endif
+ };
+ 
+ typedef struct ping_data PING;
diff --git a/recipes/inetutils/inetutils_1.8.bb b/recipes/inetutils/inetutils_1.8.bb
index 42fb760..1e3d2ab 100644
--- a/recipes/inetutils/inetutils_1.8.bb
+++ b/recipes/inetutils/inetutils_1.8.bb
@@ -17,12 +17,16 @@ SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \
            file://inetutils-1.8-1003-use-daemon-from-the-C-library-when-possible.patch \
            file://inetutils-1.8-1004-detect-fork-support.patch \
            file://inetutils-1.8-1005-ftpd-add-daemon-D-nommu-support.patch \
+           file://fix-disable-ipv6.patch \
 "
 
 inherit autotools
 
+noipv6="${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6 gl_cv_socket_ipv6=no', d)}"
 EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \
-		--with-path-procnet-dev=/proc/net/dev"
+		--with-path-procnet-dev=/proc/net/dev \
+		${noipv6} \
+		"
 
 do_configure_prepend () {
 	export HELP2MAN='true'
-- 
1.7.1




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-12-02  0:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-02  0:35 [PATCH] inetutils_1.8.bb: Fix build when DISTRO_FEATURES lacks ipv6 Graham Gower

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.