diff options
-rw-r--r-- | configure.ac | 21 | ||||
-rw-r--r-- | src/microhttpd/mhd_send.c | 6 |
2 files changed, 24 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 49bcd624..4d6e263c 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -644,9 +644,30 @@ AM_CONDITIONAL([HAVE_LISTEN_SHUTDOWN], [test "x$mhd_cv_host_shtdwn_trgr_select" | |||
644 | 644 | ||
645 | # SENDMSG. Should we check for SCM_RIGHTS instead? | 645 | # SENDMSG. Should we check for SCM_RIGHTS instead? |
646 | # https://lists.x.org/archives/xorg-devel/2013-November/038687.html | 646 | # https://lists.x.org/archives/xorg-devel/2013-November/038687.html |
647 | AC_MSG_CHECKING([whether sendmsg is available]) | ||
647 | AC_SEARCH_LIBS(sendmsg, socket, AC_DEFINE([HAVE_SENDMSG],1,[Define if your platform supports sendmsg])) | 648 | AC_SEARCH_LIBS(sendmsg, socket, AC_DEFINE([HAVE_SENDMSG],1,[Define if your platform supports sendmsg])) |
649 | AC_MSG_CHECKING([whether writev is available]) | ||
648 | AC_CHECK_FUNCS([writev]) | 650 | AC_CHECK_FUNCS([writev]) |
649 | 651 | ||
652 | # check MSG_MORE defined | ||
653 | AC_MSG_CHECKING([whether MSG_MORE defined]) | ||
654 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ | ||
655 | #include <sys/types.h> | ||
656 | #include <sys/socket.h> | ||
657 | |||
658 | int main(int argc, char **argv) | ||
659 | { | ||
660 | return MSG_MORE; | ||
661 | } | ||
662 | ])], | ||
663 | [ | ||
664 | AC_MSG_RESULT(yes) | ||
665 | AC_DEFINE(HAVE_MSG_MORE, [1], [have MSG_MORE]) | ||
666 | ], | ||
667 | [ | ||
668 | AC_MSG_RESULT(no) | ||
669 | ]) | ||
670 | |||
650 | # set GCC options | 671 | # set GCC options |
651 | # use '-fno-strict-aliasing', but only if the compiler | 672 | # use '-fno-strict-aliasing', but only if the compiler |
652 | # and linker can take it | 673 | # and linker can take it |
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index 6637d2d2..8eec8234 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -21,7 +21,7 @@ | |||
21 | /** | 21 | /** |
22 | * @file microhttpd/mhd_send.c | 22 | * @file microhttpd/mhd_send.c |
23 | * @brief Implementation of send() wrappers. | 23 | * @brief Implementation of send() wrappers. |
24 | * @author ng0 <ng0@n0.is> | 24 | * @author ng0 (N. Gillmann) |
25 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
26 | * @author Evgeny Grin | 26 | * @author Evgeny Grin |
27 | */ | 27 | */ |
@@ -48,7 +48,7 @@ static void | |||
48 | pre_cork_setsockopt (struct MHD_Connection *connection, | 48 | pre_cork_setsockopt (struct MHD_Connection *connection, |
49 | bool want_cork) | 49 | bool want_cork) |
50 | { | 50 | { |
51 | #if MSG_MORE | 51 | #if HAVE_MSG_MORE |
52 | #else | 52 | #else |
53 | int ret; | 53 | int ret; |
54 | const MHD_SCKT_OPT_BOOL_ off_val = 0; | 54 | const MHD_SCKT_OPT_BOOL_ off_val = 0; |
@@ -101,7 +101,7 @@ static void | |||
101 | post_cork_setsockopt (struct MHD_Connection *connection, | 101 | post_cork_setsockopt (struct MHD_Connection *connection, |
102 | bool want_cork) | 102 | bool want_cork) |
103 | { | 103 | { |
104 | #if MSG_MORE | 104 | #if HAVE_MSG_MORE |
105 | #else | 105 | #else |
106 | int ret; | 106 | int ret; |
107 | const MHD_SCKT_OPT_BOOL_ off_val = 0; | 107 | const MHD_SCKT_OPT_BOOL_ off_val = 0; |