From 13496bb73ecd2a76a83bf528d9a180084c8c006d Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 5 Jan 2006 18:43:10 +0000 Subject: Handle when the platform doesn't have UNIX sockets. git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@377 fefdeb5f-60dc-0310-8127-8f9354f1896f --- polyp/socket-util.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'polyp/socket-util.c') diff --git a/polyp/socket-util.c b/polyp/socket-util.c index cd132d7d..4204ec95 100644 --- a/polyp/socket-util.c +++ b/polyp/socket-util.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -42,6 +41,10 @@ #include #include +#ifdef HAVE_SYS_UN_H +#include +#endif + #include "socket-util.h" #include "util.h" #include "xmalloc.h" @@ -161,6 +164,8 @@ int pa_socket_set_sndbuf(int fd, size_t l) { return 0; } +#ifdef HAVE_SYS_UN_H + int pa_unix_socket_is_stale(const char *fn) { struct sockaddr_un sa; int fd = -1, ret = -1; @@ -202,3 +207,15 @@ int pa_unix_socket_remove_stale(const char *fn) { return 0; } + +#else /* HAVE_SYS_UN_H */ + +int pa_unix_socket_is_stale(const char *fn) { + return -1; +} + +int pa_unix_socket_remove_stale(const char *fn) { + return -1; +} + +#endif /* HAVE_SYS_UN_H */ -- cgit