aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src/xcb_auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'libxcb/src/xcb_auth.c')
-rw-r--r--libxcb/src/xcb_auth.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libxcb/src/xcb_auth.c b/libxcb/src/xcb_auth.c
index ea4ad8f6a..ec1d2027a 100644
--- a/libxcb/src/xcb_auth.c
+++ b/libxcb/src/xcb_auth.c
@@ -30,6 +30,8 @@
#include <sys/param.h>
#include <unistd.h>
#include <stdlib.h>
+#ifndef _MSC_VER
+#endif
#ifdef __INTERIX
/* _don't_ ask. interix has INADDR_LOOPBACK in here. */
@@ -257,13 +259,14 @@ static int compute_auth(xcb_auth_info_t *info, Xauth *authptr, struct sockaddr *
/* `sockaddr_un.sun_path' typical size usually ranges between 92 and 108 */
#define INITIAL_SOCKNAME_SLACK 108
+#ifndef WIN32
+typedef int (*LPFN_GETPEERNAME)(int,struct sockaddr *,socklen_t *);
+#endif
/* Return a dynamically allocated socket address structure according
to the value returned by either getpeername() or getsockname()
(according to POSIX, applications should not assume a particular
length for `sockaddr_un.sun_path') */
-static struct sockaddr *get_peer_sock_name(int (*socket_func)(int,
- struct sockaddr *,
- socklen_t *),
+static struct sockaddr *get_peer_sock_name(LPFN_GETPEERNAME socket_func,
int fd)
{
socklen_t socknamelen = sizeof(struct sockaddr) + INITIAL_SOCKNAME_SLACK;