We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 89ad4cb commit 760a024Copy full SHA for 760a024
src/bsd.c
@@ -533,7 +533,11 @@ LIBUS_SOCKET_DESCRIPTOR bsd_create_listen_socket_unix(const char *path, int opti
533
server_address.sun_family = AF_UNIX;
534
strcpy(server_address.sun_path, path);
535
int size = offsetof(struct sockaddr_un, sun_path) + strlen(server_address.sun_path);
536
+#ifdef _WIN32
537
+ _unlink(path);
538
+#else
539
unlink(path);
540
+#endif
541
542
if (bind(listenFd, (struct sockaddr *)&server_address, size) || listen(listenFd, 512)) {
543
bsd_close_socket(listenFd);
0 commit comments