hi -- we've found that the ip.c toy fails to build due to a double #include of iphdr and would like to send a patch for this.
This is my first path to the list; I followed the patch procedures from the README, but might have gotten things wrong :) Please let me know if something needs to be reworked. thanks! -mike
From aa2caffb36e2f6614ba28a1adf8f8ef3113c7e96 Mon Sep 17 00:00:00 2001 From: Mike Bennett <[email protected]> Date: Wed, 19 Jun 2019 09:35:46 -0700 Subject: [PATCH] Avoid a double-definition (iphdr) from netinet/in.h and linux/ip_tunnel.h by locally defining the single constant definition ip.c uses (IP_DF) if not already defined. --- toys/pending/ip.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/toys/pending/ip.c b/toys/pending/ip.c index 66dd06fe..c4bb5d6c 100644 --- a/toys/pending/ip.c +++ b/toys/pending/ip.c @@ -34,9 +34,12 @@ config IP #include <net/if_arp.h> #include <ifaddrs.h> #include <fnmatch.h> -#include <netinet/ip.h> #include <linux/if_tunnel.h> +#ifndef IP_DF +#define IP_DF 0x4000 /* don't fragment flag. */ +#endif + GLOBALS( char stats, singleline, flush, *filter_dev, gbuf[8192]; int sockfd, connected, from_ok, route_cmd; -- 2.22.0.410.gd8fdbe21b5-goog
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
