diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/microhttpd/mhd_send.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index 5fed8767..36d8afa7 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -350,7 +350,6 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, | |||
350 | { | 350 | { |
351 | #if defined(HAVE_SENDMSG) || defined(HAVE_WRITEV) | 351 | #if defined(HAVE_SENDMSG) || defined(HAVE_WRITEV) |
352 | MHD_socket s = connection->socket_fd; | 352 | MHD_socket s = connection->socket_fd; |
353 | int iovcnt; | ||
354 | ssize_t ret; | 353 | ssize_t ret; |
355 | struct iovec vector[2]; | 354 | struct iovec vector[2]; |
356 | 355 | ||
@@ -374,8 +373,12 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, | |||
374 | ret = sendmsg (s, &msg, MAYBE_MSG_NOSIGNAL); | 373 | ret = sendmsg (s, &msg, MAYBE_MSG_NOSIGNAL); |
375 | } | 374 | } |
376 | #elif HAVE_WRITEV | 375 | #elif HAVE_WRITEV |
377 | iovcnt = sizeof (vector) / sizeof (struct iovec); | 376 | { |
378 | ret = writev (s, vector, iovcnt); | 377 | int iovcnt; |
378 | |||
379 | iovcnt = sizeof (vector) / sizeof (struct iovec); | ||
380 | ret = writev (s, vector, iovcnt); | ||
381 | } | ||
379 | #endif | 382 | #endif |
380 | 383 | ||
381 | /* Only if we succeeded sending the full buffer, we need to make sure that | 384 | /* Only if we succeeded sending the full buffer, we need to make sure that |