diff options
Diffstat (limited to 'libxcb/src/xcb_auth.c')
-rw-r--r-- | libxcb/src/xcb_auth.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libxcb/src/xcb_auth.c b/libxcb/src/xcb_auth.c index ea4ad8f6a..eaf463cb2 100644 --- a/libxcb/src/xcb_auth.c +++ b/libxcb/src/xcb_auth.c @@ -257,13 +257,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; |