From 6734b978113d2b827e74e5e77fad6a7d9bc7f757 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 9 Nov 2018 18:36:00 -0800 Subject: POSIX requires for select function. A patch being applied to TXR in the Void Linux distribution informs me that the Musl library requires this. Traditional Unix put the select materials in and . * configure: Add test for presence of and whether that header actually declares select-related declarations and macros. Define HAVE_SYS_SELECT_H in config.h if so. * socket.c: Conditionally include . --- configure | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'configure') diff --git a/configure b/configure index cb5aedb4..5b94d229 100755 --- a/configure +++ b/configure @@ -2801,6 +2801,30 @@ else printf "no\n" fi +if [ $have_sockets ] ; then + printf "Checking whether we have ... " + + cat > conftest.c < + +int main(int argc, char **argv) +{ + fd_set rfds; + int res; + FD_ZERO(&rfds); + FD_SET(0, &rfds); + res = res = select(1, &rfds, 0, 0, 0); + return 0; +} +! + if conftest; then + printf "yes\n" + printf "#define HAVE_SYS_SELECT_H 1\n" >> config.h + else + printf "no\n" + fi +fi + printf "Checking for getaddrinfo ... " cat > conftest.c <