]> The Tcpdump Group git mirrors - libpcap/commitdiff
Don't bother checking for SIOCGSTAMPNS or SO_TIMESTAMPNS.
authorGuy Harris <[email protected]>
Wed, 19 Feb 2020 02:34:30 +0000 (18:34 -0800)
committerGuy Harris <[email protected]>
Wed, 19 Feb 2020 02:34:30 +0000 (18:34 -0800)
We only support building for 2.6.27 or later, and those have both of
those defined.

pcap-linux.c

index 6d5bde68c52f37406b6956d1c473c89bc91b593b..d5eff0aa8c9891baaad5957822b1e1af6fc7ae02 100644 (file)
@@ -346,7 +346,6 @@ pcap_create_interface(const char *device, char *ebuf)
        }
 #endif
 
-#if defined(SIOCGSTAMPNS) && defined(SO_TIMESTAMPNS)
        /*
         * We claim that we support microsecond and nanosecond time
         * stamps.
@@ -365,7 +364,6 @@ pcap_create_interface(const char *device, char *ebuf)
        }
        handle->tstamp_precision_list[0] = PCAP_TSTAMP_PRECISION_MICRO;
        handle->tstamp_precision_list[1] = PCAP_TSTAMP_PRECISION_NANO;
-#endif /* defined(SIOCGSTAMPNS) && defined(SO_TIMESTAMPNS) */
 
        struct pcap_linux *handlep = handle->priv;
        handlep->poll_breakloop_fd = eventfd(0, EFD_NONBLOCK);
@@ -2811,7 +2809,6 @@ activate_pf_packet(pcap_t *handle, int is_any_device)
                break;
        }
 
-#if defined(SIOCGSTAMPNS) && defined(SO_TIMESTAMPNS)
        if (handle->opt.tstamp_precision == PCAP_TSTAMP_PRECISION_NANO) {
                int nsec_tstamps = 1;
 
@@ -2821,7 +2818,6 @@ activate_pf_packet(pcap_t *handle, int is_any_device)
                        return PCAP_ERROR;
                }
        }
-#endif /* defined(SIOCGSTAMPNS) && defined(SO_TIMESTAMPNS) */
 
        /*
         * We've succeeded. Save the socket FD in the pcap structure.