]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
sws: #ifdef S_IFSOCK use
authorDaniel Stenberg <daniel@haxx.se>
Tue, 20 Apr 2021 07:29:23 +0000 (09:29 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 21 Apr 2021 07:35:31 +0000 (09:35 +0200)
SCO OpenServer 5.0.7 does not define S_IFSOCK.

Reported-by: Kevin R. Bulgrien
Bug: https://curl.se/mail/lib-2021-04/0074.html
Closes #6926

tests/server/sws.c

index 0c31e2e9b9979260e7b7f934cb10f8594cd49716..372e6514b9808d91e4ee2b45402e31a856c8d7bd 100644 (file)
@@ -2092,11 +2092,13 @@ int main(int argc, char *argv[])
                unix_socket, errno, strerror(errno));
         goto sws_cleanup;
       }
+#ifdef S_IFSOCK
       if((statbuf.st_mode & S_IFSOCK) != S_IFSOCK) {
         logmsg("Error binding socket, failed to stat %s: (%d) %s",
                unix_socket, error, strerror(error));
         goto sws_cleanup;
       }
+#endif
       /* dead socket, cleanup and retry bind */
       rc = unlink(unix_socket);
       if(0 != rc) {