Remove unneeded redefinitions of IPPROTO_* macros
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 12 Nov 2013 16:13:43 +0000 (16:13 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 12 Nov 2013 16:13:43 +0000 (16:13 +0000)
IPPROTO_* macros are defined by <netinet/in.h>, no need to redefine
them.

* net.c (IPPROTO_EGP, IPPROTO_PUP, IPPROTO_IDP, IPPROTO_IGMP,
IPPROTO_RAW, IPPROTO_MAX): Remove.

Reported by John Spencer.

net.c

diff --git a/net.c b/net.c
index 652b9afb351431fd6bc0d25a945cfc868a5ef6d8..ea785b3e060454ad6b5483e228f0612a9abe64c5 100644 (file)
--- a/net.c
+++ b/net.c
 # define PF_UNSPEC AF_UNSPEC
 #endif
 
-/* Under Linux these are enums so we can't test for them with ifdef. */
-#define IPPROTO_EGP IPPROTO_EGP
-#define IPPROTO_PUP IPPROTO_PUP
-#define IPPROTO_IDP IPPROTO_IDP
-#define IPPROTO_IGMP IPPROTO_IGMP
-#define IPPROTO_RAW IPPROTO_RAW
-#define IPPROTO_MAX IPPROTO_MAX
-
 static const struct xlat domains[] = {
 #ifdef PF_UNSPEC
        { PF_UNSPEC,    "PF_UNSPEC"     },