diff --git a/src/xmake.sh b/src/xmake.sh index 6d72c1270..4234925d9 100755 --- a/src/xmake.sh +++ b/src/xmake.sh @@ -248,7 +248,7 @@ check_interfaces() { check_module_cfuncs "posix" "dlfcn.h" "dlopen" check_module_cfuncs "posix" "sys/stat.h fcntl.h" "open" "stat64" "lstat64" check_module_cfuncs "posix" "unistd.h" "gethostname" - check_module_cfuncs "posix" "ifaddrs.h" "getifaddrs" + check_module_cfuncs "posix" "ifaddrs.h net/if_dl.h" "getifaddrs" check_module_cfuncs "posix" "semaphore.h" "sem_init" check_module_cfuncs "posix" "unistd.h" "getpagesize" "sysconf" check_module_cfuncs "posix" "sched.h" "sched_yield" "sched_setaffinity" # need _GNU_SOURCE diff --git a/xmake/check_interfaces.lua b/xmake/check_interfaces.lua index c906e234d..ee4c4c51d 100644 --- a/xmake/check_interfaces.lua +++ b/xmake/check_interfaces.lua @@ -183,7 +183,7 @@ function _check_interfaces(target) _check_module_cfuncs(target, "posix", "dlfcn.h", "dlopen") _check_module_cfuncs(target, "posix", {"sys/stat.h", "fcntl.h"}, "open", "stat64", "lstat64") _check_module_cfuncs(target, "posix", "unistd.h", "gethostname") - _check_module_cfuncs(target, "posix", "ifaddrs.h", "getifaddrs") + _check_module_cfuncs(target, "posix", {"ifaddrs.h", "net/if_dl.h"}, "getifaddrs") _check_module_cfuncs(target, "posix", "unistd.h", "getpagesize", "sysconf") _check_module_cfuncs(target, "posix", "sched.h", "sched_yield", "sched_setaffinity") -- need _GNU_SOURCE _check_module_cfuncs(target, "posix", "regex.h", "regcomp", "regexec")