* include/sys/un.h (UNIX_PATH_MAX): Rename from UNIX_PATH_LEN to
follow Linux. * fhandler_socket.cc: Change UNIX_PATH_LEN to UNIX_PATH_MAX throughout. (fhandler_socket::recv_internal): Don't return prematurely in case of successful return. For AF_LOCAL sockets, overwrite returned AF_INET name with AF_LOCAL name.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/* sys/un.h
|
||||
|
||||
Copyright 1999, 2000, 2001, 2005, 2009 Red Hat, Inc.
|
||||
Copyright 1999, 2000, 2001, 2005, 2009, 2013 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@ -15,11 +15,11 @@ details. */
|
||||
#include <cygwin/socket.h>
|
||||
|
||||
/* POSIX requires only at least 100 bytes */
|
||||
#define UNIX_PATH_LEN 108
|
||||
#define UNIX_PATH_MAX 108
|
||||
|
||||
struct sockaddr_un {
|
||||
sa_family_t sun_family; /* address family AF_LOCAL/AF_UNIX */
|
||||
char sun_path[UNIX_PATH_LEN]; /* 108 bytes of socket address */
|
||||
char sun_path[UNIX_PATH_MAX]; /* 108 bytes of socket address */
|
||||
};
|
||||
|
||||
/* Evaluates the actual length of `sockaddr_un' structure. */
|
||||
|
Reference in New Issue
Block a user