]> granicus.if.org Git - curl/commitdiff
asyn-thread: s/AF_LOCAL/AF_UNIX for Solaris
authorDaniel Stenberg <daniel@haxx.se>
Wed, 11 Sep 2019 21:11:58 +0000 (23:11 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 12 Sep 2019 07:37:11 +0000 (09:37 +0200)
Reported-by: Dagobert Michelsen
Fixes #4328
Closes #4333

lib/asyn-thread.c

index 24da7488502155ced4c08f4f47280d82285d8201..fcbf1305ef6666643cff3605e78a78e0ae315061 100755 (executable)
@@ -244,8 +244,8 @@ int init_thread_sync_data(struct thread_data * td,
   Curl_mutex_init(tsd->mtx);
 
 #ifdef HAVE_SOCKETPAIR
-  /* create socket pair */
-  if(socketpair(AF_LOCAL, SOCK_STREAM, 0, &tsd->sock_pair[0]) < 0) {
+  /* create socket pair, avoid AF_LOCAL since it doesn't build on Solaris */
+  if(socketpair(AF_UNIX, SOCK_STREAM, 0, &tsd->sock_pair[0]) < 0) {
     tsd->sock_pair[0] = CURL_SOCKET_BAD;
     tsd->sock_pair[1] = CURL_SOCKET_BAD;
     goto err_exit;