diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-01-22 19:29:32 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-01-22 19:29:32 -0800 |
commit | 90ce77da29cc76424eac91681f4a566ecc4792ff (patch) | |
tree | a68c2db5c753b5c117757956de79d576e16710ac /CMakeLists.txt | |
parent | 1d2cbb914a348a0ba55a182f02f80c92db6a455e (diff) | |
download | tcpdump-90ce77da29cc76424eac91681f4a566ecc4792ff.tar.gz |
Fix check for rpc/rpcent.h.
Autotools' check in AC_CHECK_HEADERS() apparently either doesn't
actually try to include it or somehow arranges to define stuff that it
requires on FreeBSD. CMake's check in check_include_file() just tries
to include it, which fails on FreeBSD because __BEGIN_DECLS isn't
defined.
The man page for getrpcbynumber() says we just need to include
<rpc/rpc.h>; perhaps there are platforms on which we require both, and
that's what we do, so test it with rpc/rpc.h if we have rpc/rpc.h.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d7c31ad..2c2420ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,7 +134,9 @@ include(CheckTypeSize) # check_include_file(fcntl.h HAVE_FCNTL_H) check_include_file(rpc/rpc.h HAVE_RPC_RPC_H) -check_include_file(rpc/rpcent.h HAVE_RPC_RPCENT_H) +if(HAVE_RPC_RPC_H) + check_include_files("rpc.h;rpc/rpcent.h" HAVE_RPC_RPCENT_H) +endif(HAVE_RPC_RPC_H) check_include_file(netdnet/dnetdb.h HAVE_NETDNET_DNETDB_H) check_include_files("sys/types.h;sys/socket.h;net/if.h;net/pfvar.h" HAVE_NET_PFVAR_H) if(HAVE_NET_PFVAR_H) |