NetBSD also has a size field in socket addresses.

llvm-svn: 191387
This commit is contained in:
Joerg Sonnenberger 2013-09-25 17:56:00 +00:00
parent 1e0621cea2
commit 34ea0f8a34
1 changed files with 2 additions and 2 deletions

View File

@ -1201,7 +1201,7 @@ ConnectionFileDescriptor::NamedSocketAccept (const char *socket_name, Error *err
saddr_un.sun_family = AF_UNIX;
::strncpy(saddr_un.sun_path, socket_name, sizeof(saddr_un.sun_path) - 1);
saddr_un.sun_path[sizeof(saddr_un.sun_path) - 1] = '\0';
#if defined(__APPLE__) || defined(__FreeBSD__)
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
saddr_un.sun_len = SUN_LEN (&saddr_un);
#endif
@ -1254,7 +1254,7 @@ ConnectionFileDescriptor::NamedSocketConnect (const char *socket_name, Error *er
saddr_un.sun_family = AF_UNIX;
::strncpy(saddr_un.sun_path, socket_name, sizeof(saddr_un.sun_path) - 1);
saddr_un.sun_path[sizeof(saddr_un.sun_path) - 1] = '\0';
#if defined(__APPLE__) || defined(__FreeBSD__)
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
saddr_un.sun_len = SUN_LEN (&saddr_un);
#endif