mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
Conditional compilation of localnetwork matching
Some architectures (esp32) might not have this API. Fixes: #263 Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -48,11 +48,15 @@ if (UNIX AND NOT WIN32)
|
||||
torture_pki_ed25519
|
||||
# requires /dev/null
|
||||
torture_channel
|
||||
# requires some non-standard API from netdb.h, in.h
|
||||
# and arpa/inet.h for handling IP addresses
|
||||
torture_config_match_localnetwork
|
||||
)
|
||||
|
||||
if (HAVE_IFADDRS_H)
|
||||
set(LIBSSH_UNIT_TESTS
|
||||
${LIBSSH_UNIT_TESTS}
|
||||
# requires some non-standard API from netdb.h, in.h
|
||||
# and arpa/inet.h for handling IP addresses
|
||||
torture_config_match_localnetwork
|
||||
)
|
||||
endif (HAVE_IFADDRS_H)
|
||||
if (WITH_SERVER)
|
||||
set(LIBSSH_UNIT_TESTS
|
||||
${LIBSSH_UNIT_TESTS}
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
#include "libssh/options.h"
|
||||
#include "libssh/session.h"
|
||||
#include "match.c"
|
||||
#ifdef HAVE_IFADDRS_H
|
||||
#include <ifaddrs.h>
|
||||
#endif
|
||||
#include <net/if.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user