diff options
author | James Clarke <jrtc27@jrtc27.com> | 2017-10-07 18:53:21 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-10-30 14:51:25 +0100 |
commit | 4d0971b7fbb9069c104e3746bb22d2155ec275ee (patch) | |
tree | 008f08d782c34ff7ee973ee8ad7740b4e872d10a /networking/ping.c | |
parent | a1e9bc6876f6539805095e9395c604d3675c526d (diff) | |
download | busybox-w32-4d0971b7fbb9069c104e3746bb22d2155ec275ee.tar.gz busybox-w32-4d0971b7fbb9069c104e3746bb22d2155ec275ee.tar.bz2 busybox-w32-4d0971b7fbb9069c104e3746bb22d2155ec275ee.zip |
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/ping.c')
-rw-r--r-- | networking/ping.c | 8 |
1 files changed, 8 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 - !!? |