From 75c6845ef1fc840afe995a84f3cd1c94f5257d7d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 4 Aug 2021 20:42:45 -0700 Subject: musl: fix missing . Issue peported by Ethan Hawk. Our socket.c module is using struct timeval without including , which breaks on musl. * configure: in the select test, let's include , and if the test passes, let's set have_sys_time, so that HAVE_SELECT implies HAVE_SYS_TIME. This way code wrapped with HAVE_SELECT doesn't separately have to test for HAVE_SYS_TIME. * socket.c: If HAVE_SYS_TIME is true, then we include , independently of HAVE_SELECT. (sock_timeout, sock_load_init): Like the select-based code, code using SO_SNDTIMEO or SO_RCVTIMO also uses timeval, so needs to be wrapped with HAVE_SYS_TIME. --- configure | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configure') diff --git a/configure b/configure index ead8bccc..63f1ec5c 100755 --- a/configure +++ b/configure @@ -3480,6 +3480,7 @@ if [ $have_sockets ] ; then cat > conftest.c < +#include int main(int argc, char **argv) { @@ -3494,6 +3495,7 @@ int main(int argc, char **argv) if conftest; then printf "yes\n" printf "#define HAVE_SELECT 1\n" >> config.h + have_sys_time=y else printf "no\n" fi -- cgit v1.2.3