diff options
-rw-r--r-- | networking/ping.c | 8 | ||||
-rw-r--r-- | networking/traceroute.c | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/networking/ping.c b/networking/ping.c index 774f8f3e0..d1d59d545 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
@@ -135,6 +135,14 @@ | |||
135 | # define ICMP_ADDRESSREPLY 18 /* Address Mask Reply */ | 135 | # define ICMP_ADDRESSREPLY 18 /* Address Mask Reply */ |
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | /* Some operating systems, like GNU/Hurd, don't define SOL_RAW, but do have | ||
139 | * IPPROTO_RAW. Since the IPPROTO definitions are also valid to use for | ||
140 | * setsockopt (and take the same value as their corresponding SOL definitions, | ||
141 | * if they exist), we can just fall back on IPPROTO_RAW. */ | ||
142 | #ifndef SOL_RAW | ||
143 | # define SOL_RAW IPPROTO_RAW | ||
144 | #endif | ||
145 | |||
138 | #if ENABLE_PING6 | 146 | #if ENABLE_PING6 |
139 | # include <netinet/icmp6.h> | 147 | # include <netinet/icmp6.h> |
140 | /* I see RENUMBERED constants in bits/in.h - !!? | 148 | /* I see RENUMBERED constants in bits/in.h - !!? |
diff --git a/networking/traceroute.c b/networking/traceroute.c index 8b6247482..df7122047 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
@@ -323,6 +323,14 @@ | |||
323 | # define IPPROTO_IP 0 | 323 | # define IPPROTO_IP 0 |
324 | #endif | 324 | #endif |
325 | 325 | ||
326 | /* Some operating systems, like GNU/Hurd, don't define SOL_RAW, but do have | ||
327 | * IPPROTO_RAW. Since the IPPROTO definitions are also valid to use for | ||
328 | * setsockopt (and take the same value as their corresponding SOL definitions, | ||
329 | * if they exist), we can just fall back on IPPROTO_RAW. */ | ||
330 | #ifndef SOL_RAW | ||
331 | # define SOL_RAW IPPROTO_RAW | ||
332 | #endif | ||
333 | |||
326 | 334 | ||
327 | #define OPT_STRING \ | 335 | #define OPT_STRING \ |
328 | "FIlnrdvxt:i:m:p:q:s:w:z:f:" \ | 336 | "FIlnrdvxt:i:m:p:q:s:w:z:f:" \ |