socketpair: fix compilation when USE_UNIX_SOCKETS is not defined

Closes #13666
This commit is contained in:
Antoine Bollengier 2024-05-15 22:46:05 +02:00 committed by Daniel Stenberg
parent df4a8c7661
commit 7c5ad6d278
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -38,7 +38,16 @@
#define wakeup_write swrite
#define wakeup_read sread
#define wakeup_close sclose
#define wakeup_create(p) Curl_socketpair(AF_UNIX, SOCK_STREAM, 0, p)
#if defined(USE_UNIX_SOCKETS) && defined(HAVE_SOCKETPAIR)
#define SOCKET_FAMILY AF_UNIX
#elif !defined(HAVE_SOCKETPAIR)
#define SOCKET_FAMILY 0 /* not used */
#else
#error "unsupported unix domain and socketpair build combo"
#endif
#define wakeup_create(p) Curl_socketpair(SOCKET_FAMILY, SOCK_STREAM, 0, p)
#endif /* HAVE_PIPE */