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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libxcb/src/xcb_auth.c b/libxcb/src/xcb_auth.c
index a5b730c0c..0514a77e7 100644
--- a/libxcb/src/xcb_auth.c
+++ b/libxcb/src/xcb_auth.c
@@ -265,13 +265,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;