]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
socketpair: allow CURL_DISABLE_SOCKETPAIR
authorDaniel Stenberg <daniel@haxx.se>
Fri, 14 Aug 2020 13:45:08 +0000 (15:45 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 27 Aug 2020 06:55:56 +0000 (08:55 +0200)
... to completely disable the use of socketpair

lib/multihandle.h
lib/socketpair.c

index 9d73df08124c22b3c938647f865472dd40a44173..e5f9012fe4afdc03374962ea19a336a236f1ff25 100644 (file)
@@ -67,11 +67,11 @@ typedef enum {
 
 #define CURLPIPE_ANY (CURLPIPE_MULTIPLEX)
 
-#if defined(USE_SOCKETPAIR) && !defined(USE_BLOCKING_SOCKETS)
+#if defined(USE_SOCKETPAIR) && !defined(USE_BLOCKING_SOCKETS) &&        \
+  !defined(CURL_DISABLE_SOCKETPAIR)
 #define ENABLE_WAKEUP
 #endif
 
-
 /* value for MAXIMUM CONCURRENT STREAMS upper limit */
 #define INITIAL_MAX_CONCURRENT_STREAMS ((1U << 31) - 1)
 
index 1ec0d75a468c384f801a614d91fe18d6e5c6fec1..2a89b7b2068612a8b5238487ca1e959f710eb90f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2019, 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -23,7 +23,7 @@
 #include "curl_setup.h"
 #include "socketpair.h"
 
-#ifndef HAVE_SOCKETPAIR
+#if !defined(HAVE_SOCKETPAIR) && !defined(CURL_DISABLE_SOCKETPAIR)
 #ifdef WIN32
 /*
  * This is a socketpair() implementation for Windows.