]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Include <errno.h> on both Windows and UN*X.
authorGuy Harris <[email protected]>
Sun, 4 May 2014 17:08:44 +0000 (10:08 -0700)
committerGuy Harris <[email protected]>
Sun, 4 May 2014 17:08:58 +0000 (10:08 -0700)
We need <errno.h> on UN*X in some files that include tcpdump-stdinc.h,
such as missing/inet_pton.c.

Remove includes of <errno.h> from files that include tcpdump-stdinc.h.

missing/inet_ntop.c
tcpdump-stdinc.h
tcpdump.c
util.c

index 57539dc5ce80beed97d2d5707a3ad08c158d1efd..8c6f7eb8c7eba93fbdba3a86ef3fbe442de3b605 100644 (file)
@@ -43,7 +43,6 @@
 #include <tcpdump-stdinc.h>
 
 #include <stdio.h>
-#include <errno.h>
 
 /*
  *
index 5e5773b7286752a1c1d610d74f6d745bb91ed1bb..32f8fc920b0111c079f2abf1c7bcd353493e1422 100644 (file)
@@ -39,6 +39,8 @@
 #ifndef tcpdump_stdinc_h
 #define tcpdump_stdinc_h
 
+#include <errno.h>
+
 #ifdef WIN32
 
 #include <stdint.h>
@@ -49,7 +51,6 @@
 #include <ctype.h>
 #include <time.h>
 #include <io.h>
-#include <errno.h>
 #include <fcntl.h>
 #include <sys/types.h>
 #include <net/netdb.h>  /* in wpcap's Win32/include */
index f1ed46e0ee23f27eef3bd1c805a56e6a984efcfb..fc86d32b4faef6e36a0d85ce09920d172321997d 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -73,7 +73,6 @@ extern int SIZE_BUF;
 #include <sys/resource.h>
 #include <pwd.h>
 #include <grp.h>
-#include <errno.h>
 #endif /* WIN32 */
 
 /* capabilities convinience library */
diff --git a/util.c b/util.c
index 13c87225593cd391dee0a7bcba389a1126788c2e..12a15023e6d2a6145aa22f508585e11eb624da26 100644 (file)
--- a/util.c
+++ b/util.c
@@ -28,7 +28,6 @@
 
 #include <sys/stat.h>
 
-#include <errno.h>
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif