summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/socketpair.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-12-12 01:33:07 (GMT)
committerBrad King <brad.king@kitware.com>2023-12-12 01:33:07 (GMT)
commit548f0cfd1db2f6a4b971df94a0a47655b51ff9d9 (patch)
treebbba54962c79e662d7d04986e113f50efd39654e /Utilities/cmcurl/lib/socketpair.h
parent38f85b839019c0674e9f8abae141e7b087f44c16 (diff)
parentfe5ffe06a9e09b7be5ff432049cb427894a78dcb (diff)
downloadCMake-548f0cfd1db2f6a4b971df94a0a47655b51ff9d9.zip
CMake-548f0cfd1db2f6a4b971df94a0a47655b51ff9d9.tar.gz
CMake-548f0cfd1db2f6a4b971df94a0a47655b51ff9d9.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2023-12-06 (7161cb17)
Diffstat (limited to 'Utilities/cmcurl/lib/socketpair.h')
-rw-r--r--Utilities/cmcurl/lib/socketpair.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/Utilities/cmcurl/lib/socketpair.h b/Utilities/cmcurl/lib/socketpair.h
index 306ab5d..bd499ab 100644
--- a/Utilities/cmcurl/lib/socketpair.h
+++ b/Utilities/cmcurl/lib/socketpair.h
@@ -25,6 +25,23 @@
***************************************************************************/
#include "curl_setup.h"
+
+#ifdef HAVE_PIPE
+
+#define wakeup_write write
+#define wakeup_read read
+#define wakeup_close close
+#define wakeup_create pipe
+
+#else /* HAVE_PIPE */
+
+#define wakeup_write swrite
+#define wakeup_read sread
+#define wakeup_close sclose
+#define wakeup_create(p) Curl_socketpair(AF_UNIX, SOCK_STREAM, 0, p)
+
+#endif /* HAVE_PIPE */
+
#ifndef HAVE_SOCKETPAIR
#include <curl/curl.h>