Skip to content

Commit

Permalink
socketpair: fix compilation when USE_UNIX_SOCKETS is not defined
Browse files Browse the repository at this point in the history
Closes #13666
  • Loading branch information
b5i authored and bagder committed May 16, 2024
1 parent df4a8c7 commit 7c5ad6d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/socketpair.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down

0 comments on commit 7c5ad6d

Please sign in to comment.