diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2023-03-03 18:16:21 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2023-03-03 18:16:21 +0300 |
commit | 41ceade78dee1d75ebc46e691bc2acdfbc9e31ff (patch) | |
tree | bed757fcdb18b3cc34e5f43720cbb0064feb0290 | |
parent | 22686148621de5f3f680808a7364de6087c10608 (diff) | |
download | libmicrohttpd-41ceade78dee1d75ebc46e691bc2acdfbc9e31ff.tar.gz libmicrohttpd-41ceade78dee1d75ebc46e691bc2acdfbc9e31ff.zip |
mhd_shutdown_socket_trigger.m4: fixed compiler warning
-rw-r--r-- | m4/mhd_shutdown_socket_trigger.m4 | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/m4/mhd_shutdown_socket_trigger.m4 b/m4/mhd_shutdown_socket_trigger.m4 index 469271b7..33505d81 100644 --- a/m4/mhd_shutdown_socket_trigger.m4 +++ b/m4/mhd_shutdown_socket_trigger.m4 | |||
@@ -11,24 +11,37 @@ | |||
11 | # | 11 | # |
12 | # LICENSE | 12 | # LICENSE |
13 | # | 13 | # |
14 | # Copyright (c) 2017 Karlson2k (Evgeny Grin) <k2k@narod.ru> | 14 | # Copyright (c) 2017-2023 Karlson2k (Evgeny Grin) <k2k@narod.ru> |
15 | # | 15 | # |
16 | # Copying and distribution of this file, with or without modification, are | 16 | # Copying and distribution of this file, with or without modification, are |
17 | # permitted in any medium without royalty provided the copyright notice | 17 | # permitted in any medium without royalty provided the copyright notice |
18 | # and this notice are preserved. This file is offered as-is, without any | 18 | # and this notice are preserved. This file is offered as-is, without any |
19 | # warranty. | 19 | # warranty. |
20 | 20 | ||
21 | #serial 3 | 21 | #serial 4 |
22 | 22 | ||
23 | AC_DEFUN([MHD_CHECK_SOCKET_SHUTDOWN_TRIGGER],[dnl | 23 | AC_DEFUN([MHD_CHECK_SOCKET_SHUTDOWN_TRIGGER],[dnl |
24 | AC_PREREQ([2.64])dnl | 24 | AC_PREREQ([2.64])dnl |
25 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | 25 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
26 | AC_REQUIRE([AC_PROG_CC])dnl | 26 | AC_REQUIRE([AC_PROG_CC])dnl |
27 | AC_REQUIRE([AX_PTHREAD])dnl | 27 | AC_REQUIRE([AX_PTHREAD])dnl |
28 | AC_CHECK_HEADERS([sys/time.h],[AC_CHECK_FUNCS([gettimeofday])],[], [AC_INCLUDES_DEFAULT]) | 28 | AC_CHECK_HEADERS([sys/time.h time.h])dnl |
29 | dnl AC_CHECK_HEADERS([time.h],[AC_CHECK_FUNCS([nanosleep])],[], [AC_INCLUDES_DEFAULT]) | 29 | MHD_CHECK_FUNC([[gettimeofday]], |
30 | [[ | ||
31 | #ifdef HAVE_SYS_TIME_H | ||
32 | #include <sys/time.h> | ||
33 | #endif /* HAVE_SYS_TIME_H */ | ||
34 | #ifdef HAVE_TIME_H | ||
35 | #include <time.h> | ||
36 | #endif /* HAVE_TIME_H */ | ||
37 | ]], | ||
38 | [[ | ||
39 | struct timeval tv; | ||
40 | if (0 != gettimeofday (&tv, (void*) 0)) | ||
41 | return 1; | ||
42 | ]] | ||
43 | ) | ||
30 | MHD_CHECK_FUNC([[usleep]], [[#include <unistd.h>]], [[usleep(100000);]]) | 44 | MHD_CHECK_FUNC([[usleep]], [[#include <unistd.h>]], [[usleep(100000);]]) |
31 | dnl AC_CHECK_HEADERS([unistd.h],[AC_CHECK_FUNCS([usleep])],[], [AC_INCLUDES_DEFAULT]) | ||
32 | MHD_CHECK_FUNC([[nanosleep]], [[#include <time.h>]], [[struct timespec ts2, ts1 = {0, 0}; nanosleep(&ts1, &ts2);]]) | 45 | MHD_CHECK_FUNC([[nanosleep]], [[#include <time.h>]], [[struct timespec ts2, ts1 = {0, 0}; nanosleep(&ts1, &ts2);]]) |
33 | AC_CHECK_HEADERS([string.h sys/types.h sys/socket.h netinet/in.h time.h sys/select.h netinet/tcp.h],[],[], [AC_INCLUDES_DEFAULT]) | 46 | AC_CHECK_HEADERS([string.h sys/types.h sys/socket.h netinet/in.h time.h sys/select.h netinet/tcp.h],[],[], [AC_INCLUDES_DEFAULT]) |
34 | AC_CACHE_CHECK([[whether shutdown of listen socket triggers select()]], | 47 | AC_CACHE_CHECK([[whether shutdown of listen socket triggers select()]], |