summaryrefslogtreecommitdiff
path: root/networking/traceroute.c
diff options
context:
space:
mode:
authorJames Clarke2017-10-07 18:53:21 +0100
committerDenys Vlasenko2017-10-30 14:51:25 +0100
commit4d0971b7fbb9069c104e3746bb22d2155ec275ee (patch)
tree008f08d782c34ff7ee973ee8ad7740b4e872d10a /networking/traceroute.c
parenta1e9bc6876f6539805095e9395c604d3675c526d (diff)
downloadbusybox-4d0971b7fbb9069c104e3746bb22d2155ec275ee.zip
busybox-4d0971b7fbb9069c104e3746bb22d2155ec275ee.tar.gz
networking: Fall back on IPPROTO_RAW when SOL_RAW is not defined
Signed-off-by: James Clarke <jrtc27@jrtc27.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/traceroute.c')
-rw-r--r--networking/traceroute.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 8b62474..df71220 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -323,6 +323,14 @@
# define IPPROTO_IP 0
#endif
+/* Some operating systems, like GNU/Hurd, don't define SOL_RAW, but do have
+ * IPPROTO_RAW. Since the IPPROTO definitions are also valid to use for
+ * setsockopt (and take the same value as their corresponding SOL definitions,
+ * if they exist), we can just fall back on IPPROTO_RAW. */
+#ifndef SOL_RAW
+# define SOL_RAW IPPROTO_RAW
+#endif
+
#define OPT_STRING \
"FIlnrdvxt:i:m:p:q:s:w:z:f:" \