Skip to content

Commit f81ffd1

Browse files
committed
Include <fcntl.h> unconditionally
It is used for open() which is in POSIX.1-2001, POSIX.1-2008. libpcap has included <fcntl.h> unconditionally since at least 1999.
1 parent e57fe28 commit f81ffd1

File tree

4 files changed

+1
-7
lines changed

4 files changed

+1
-7
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ cmake_pop_check_state()
343343
#
344344
# Header files.
345345
#
346-
check_include_file(fcntl.h HAVE_FCNTL_H)
347346
check_include_file(rpc/rpc.h HAVE_RPC_RPC_H)
348347
check_include_file(net/if.h HAVE_NET_IF_H)
349348
if(HAVE_RPC_RPC_H)

cmakeconfig.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
/* Define to 1 if you have the `EVP_DecryptInit_ex' function. */
4040
#cmakedefine HAVE_EVP_DECRYPTINIT_EX 1
4141

42-
/* Define to 1 if you have the <fcntl.h> header file. */
43-
#cmakedefine HAVE_FCNTL_H 1
44-
4542
/* Define to 1 if you have the `fork' function. */
4643
#cmakedefine HAVE_FORK 1
4744

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ if test "$ac_cv_prog_cc_c99" = "no"; then
3030
fi
3131
AC_LBL_C_INIT(V_CCOPT, V_INCLS)
3232

33-
AC_CHECK_HEADERS(fcntl.h rpc/rpc.h rpc/rpcent.h net/if.h)
33+
AC_CHECK_HEADERS(rpc/rpc.h rpc/rpcent.h net/if.h)
3434
#
3535
# Get the size of a void *, to know whether this is a 32-bit or 64-bit build.
3636
#

tcpdump.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ The Regents of the University of California. All rights reserved.\n";
6161

6262
#include <sys/stat.h>
6363

64-
#ifdef HAVE_FCNTL_H
6564
#include <fcntl.h>
66-
#endif
6765

6866
#ifdef HAVE_LIBCRYPTO
6967
#include <openssl/crypto.h>

0 commit comments

Comments
 (0)