Skip to content

Commit 17f21cc

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. (cherry picked from commit f81ffd1)
1 parent 6cc9548 commit 17f21cc

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
@@ -344,7 +344,6 @@ cmake_pop_check_state()
344344
#
345345
# Header files.
346346
#
347-
check_include_file(fcntl.h HAVE_FCNTL_H)
348347
check_include_file(rpc/rpc.h HAVE_RPC_RPC_H)
349348
check_include_file(net/if.h HAVE_NET_IF_H)
350349
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
@@ -31,7 +31,7 @@ fi
3131
AC_LBL_C_INIT(V_CCOPT, V_INCLS)
3232
AC_LBL_C_INLINE
3333

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

tcpdump.c

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

6464
#include <sys/stat.h>
6565

66-
#ifdef HAVE_FCNTL_H
6766
#include <fcntl.h>
68-
#endif
6967

7068
#ifdef HAVE_LIBCRYPTO
7169
#include <openssl/crypto.h>

0 commit comments

Comments
 (0)