]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use ether_ntohost() if we have it.
authorGuy Harris <[email protected]>
Mon, 22 Jan 2018 10:47:50 +0000 (02:47 -0800)
committerGuy Harris <[email protected]>
Mon, 22 Jan 2018 10:47:50 +0000 (02:47 -0800)
We don't bother checking to see whether it's buggy; we assume those bugs
are fixed by now.

CMakeLists.txt

index 24ebcca379a3991fb7d06094d47b6632d59c05b5..e2abc7a383bc0907e72ed02eee18c4f1ad0d440d 100644 (file)
@@ -136,7 +136,15 @@ endif(HAVE_NET_PFVAR_H)
 check_function_exists(ether_ntohost HAVE_ETHER_NTOHOST)
 if(HAVE_ETHER_NTOHOST)
     #
-    # OK, we have ether_ntohost().  Is it declared in <net/ethernet.h>?
+    # OK, we have ether_ntohost().  We don't check whether it's buggy,
+    # as we assume any system that has CMake is likely to be new enough
+    # that, if it has ether_ntohost(), it's not buggy; we just decide
+    # to use it.
+    #
+    set(USE_ETHER_NTOHOST TRUE)
+
+    #
+    # Is it declared in <net/ethernet.h>?
     #
     # This test fails if we don't have <net/ethernet.h> or if we do
     # but it doesn't declare ether_ntohost().