diff options
author | François Revol <revol@free.fr> | 2022-07-09 01:07:53 +0200 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2022-07-13 22:13:10 -0700 |
commit | 8e9c7223dc63b2e7b5f9df83529f1b396a8bdc64 (patch) | |
tree | 85e36df9bb356d84d274ea0791396c13539f9a60 /CMakeLists.txt | |
parent | 23159ec45ef306eab8ef1caaa4c12d17dac2f457 (diff) | |
download | libpcap-8e9c7223dc63b2e7b5f9df83529f1b396a8bdc64.tar.gz |
On Haiku, add a check for libbsd which has getpass
(cherry picked from commit 1d24bb8f71c7d1e78090aa317190c4647422ed3c)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 58867254..6278f534 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -580,6 +580,15 @@ else(WIN32) set(PCAP_LINK_LIBRARIES str ${PCAP_LINK_LIBRARIES}) endif(LIBSTR_HAS_PUTMSG) endif(NOT STDLIBS_HAVE_PUTMSG) + + # Haiku has getpass in libbsd + check_function_exists(getpass STDLIBS_HAVE_GETPASS) + if(NOT STDLIBS_HAVE_GETPASS) + check_library_exists(bsd getpass "" LIBBSD_HAS_GETPASS) + if(LIBBSD_HAS_GETPASS) + set(PCAP_LINK_LIBRARIES bsd ${PCAP_LINK_LIBRARIES}) + endif(LIBBSD_HAS_GETPASS) + endif(NOT STDLIBS_HAVE_GETPASS) endif(WIN32) # |