Skip to content
Snippets Groups Projects
Commit d2ef0fe2 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix webserver build on Windows - no UNIX domain socket support

According to
https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/
it is possible, but I think I'm using an WinSDK that's too old, so let's just
not support this feature on Windows just yet. Define UDS_SUPPORT when
supported.
parent 38b9bc8a
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3732 passed
......@@ -39,6 +39,8 @@
#include <sys/wait.h> /* waitpid() */
#include <sys/types.h>
#include <signal.h> /* kill() */
#elif defined(_WIN32) && defined(UDS_SUPPORT)
#include <afunix.h>
#endif
#ifndef JAVASCRIPT
......@@ -3928,6 +3930,10 @@ static SOCKET fastcgi_connect(const char *orig_path, SOCKET client_sock)
SOCKET sock;
if (strncmp(path, "unix:", 5) == 0) {
#if defined(_WIN32) && !defined(UDS_SUPPORT)
lprintf(LOG_ERR, "%04d UNIX DOMAIN SOCKETS ARE NOT SUPPORTED in %s", client_sock, __FUNCTION__);
return INVALID_SOCKET;
#else
// UNIX-domain socket
struct sockaddr_un addr;
socklen_t addr_len;
......@@ -3951,6 +3957,7 @@ static SOCKET fastcgi_connect(const char *orig_path, SOCKET client_sock)
closesocket(sock);
sock = INVALID_SOCKET;
}
#endif
} else {
// TCP Socket
char *port = split_port_part(path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment