sws: #ifdef S_IFSOCK use

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
This commit is contained in:
Daniel Stenberg 2021-04-20 09:29:23 +02:00
parent 0594c00621
commit 415d6fa7da
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 2 additions and 0 deletions

View 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) {