]> granicus.if.org Git - strace/commitdiff
net.c: use ICMP_FILTER unconditionally
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 15 Jun 2016 21:29:07 +0000 (21:29 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 16 Jun 2016 01:00:23 +0000 (01:00 +0000)
* net.c: Do not check for ICMP_FILTER availability.

net.c

diff --git a/net.c b/net.c
index 9c4af0d584158f7ae2d369decfbe7d200efc6dcd..169e702db6e8410c9e8a3b927e5862f2830070e5 100644 (file)
--- a/net.c
+++ b/net.c
@@ -1234,8 +1234,7 @@ print_tpacket_stats(struct tcb *tcp, long addr, int len)
 }
 #endif /* PACKET_STATISTICS */
 
-#ifdef ICMP_FILTER
-# include "xlat/icmpfilterflags.h"
+#include "xlat/icmpfilterflags.h"
 
 static void
 print_icmp_filter(struct tcb *tcp, const long addr, int len)
@@ -1256,7 +1255,6 @@ print_icmp_filter(struct tcb *tcp, const long addr, int len)
        printflags(icmpfilterflags, ~filter.data, "ICMP_???");
        tprints(")");
 }
-#endif /* ICMP_FILTER */
 
 static void
 print_getsockopt(struct tcb *tcp, unsigned int level, unsigned int name,
@@ -1291,11 +1289,9 @@ print_getsockopt(struct tcb *tcp, unsigned int level, unsigned int name,
 
        case SOL_RAW:
                switch (name) {
-#ifdef ICMP_FILTER
                case ICMP_FILTER:
                        print_icmp_filter(tcp, addr, len);
                        goto done;
-#endif
                }
                break;
        }
@@ -1527,11 +1523,9 @@ print_setsockopt(struct tcb *tcp, unsigned int level, unsigned int name,
 
        case SOL_RAW:
                switch (name) {
-#ifdef ICMP_FILTER
                case ICMP_FILTER:
                        print_icmp_filter(tcp, addr, len);
                        goto done;
-#endif
                }
                break;
        }