]> granicus.if.org Git - apache/commitdiff
Get ap_socket_disable_nagle() working again.
authorJeff Trawick <trawick@apache.org>
Wed, 26 Jul 2000 14:12:38 +0000 (14:12 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 26 Jul 2000 14:12:38 +0000 (14:12 +0000)
Submitted by: Greg Ames
Reviewed by: Jeff Trawick

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85894 13f79535-47bb-0310-9956-ffa450edef68

include/mpm_common.h
server/mpm_common.c

index f3d73aaedf91e8382776bb2381731dfc2eb5d983..3a7131ed30759a58547d4c1ac789a841796ddbb7 100644 (file)
 extern "C" {
 #endif
 
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>    /* for TCP_NODELAY */
+#endif
+        
 void ap_reclaim_child_processes(int terminate);
 void ap_wait_or_timeout(ap_wait_t *status, ap_proc_t *ret, ap_pool_t *p);
 void ap_process_child_status(ap_proc_t *pid, ap_wait_t status);
index 2e1df1da9d2e810b2468b575b07dc45600025eef..1028fc8dbe47550e876da848df3851514d169c93 100644 (file)
@@ -77,6 +77,9 @@
 #if HAVE_SYS_TIME_H
 #include <sys/time.h> /* for timeval definitions */
 #endif
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h> /* for setsockopt prototype */
+#endif
 
 #if defined(DEXTER) || defined(MPMT_BEOS_MPM) || defined(BEOS_MPM)
 #define CHILD_TABLE 1
@@ -290,7 +293,7 @@ void ap_sock_disable_nagle(int s)
      */
     int just_say_no = 1;
 
-    if (ap_setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &just_say_no,
+    if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &just_say_no,
                    sizeof(int)) != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
                     "setsockopt: (TCP_NODELAY)");