From 19d9fcbda8637099854f2d8147b402b4420d19f5 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 5 Jan 2006 22:51:37 +0000 Subject: Port to Windows. This is mostly glue layers for the poor POSIX support on Windows. A few notes * Only sockets behave somewhat like file descriptors in UNIX. * There are no fixed paths. Closes thing is environment variables that point to system directories. We also figure out where the binary/dll is located and use that as configuration directory. git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@418 fefdeb5f-60dc-0310-8127-8f9354f1896f --- polyp/socket-util.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'polyp/socket-util.c') diff --git a/polyp/socket-util.c b/polyp/socket-util.c index 60f8d167..699b28c2 100644 --- a/polyp/socket-util.c +++ b/polyp/socket-util.c @@ -57,6 +57,11 @@ #include #endif +#ifdef HAVE_WINSOCK2_H +#include +#define ETIMEDOUT WSAETIMEDOUT +#endif + #include "socket-util.h" #include "util.h" #include "xmalloc.h" @@ -72,6 +77,7 @@ void pa_socket_peer_to_string(int fd, char *c, size_t l) { return; } +#ifndef OS_IS_WIN32 if (S_ISSOCK(st.st_mode)) { union { struct sockaddr sa; @@ -104,6 +110,7 @@ void pa_socket_peer_to_string(int fd, char *c, size_t l) { snprintf(c, l, "STDIN/STDOUT client"); return; } +#endif /* OS_IS_WIN32 */ snprintf(c, l, "Unknown client"); } -- cgit