summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-08-14 15:45:08 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-08-27 08:55:56 +0200
commitb4a712dab0473bdbb3b2bed1cbfa6ac49b034f93 (patch)
treef105868fa922ed0ecfc829bfabd22ff7bde9a65a
parent861b45423d30d21a55f0d8ed09ee6843268746ba (diff)
downloadcurl-b4a712dab0473bdbb3b2bed1cbfa6ac49b034f93.tar.gz
socketpair: allow CURL_DISABLE_SOCKETPAIR
... to completely disable the use of socketpair
-rw-r--r--lib/multihandle.h4
-rw-r--r--lib/socketpair.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/multihandle.h b/lib/multihandle.h
index 9d73df081..e5f9012fe 100644
--- a/lib/multihandle.h
+++ b/lib/multihandle.h
@@ -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)
diff --git a/lib/socketpair.c b/lib/socketpair.c
index 1ec0d75a4..2a89b7b20 100644
--- a/lib/socketpair.c
+++ b/lib/socketpair.c
@@ -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.