diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-03-01 19:23:31 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-03-01 19:31:01 +0100 |
commit | 952c2ba004eaba6e7c89a3f9baf813f4da445494 (patch) | |
tree | 3433a841f88e43182b9934c5856ae86fab7ffb46 /sysdeps/mach/hurd/sendto.c | |
parent | 5ad2e8f7117367104ff4ecf293f6ad7017e4f184 (diff) |
Introduce a common helper
Diffstat (limited to 'sysdeps/mach/hurd/sendto.c')
-rw-r--r-- | sysdeps/mach/hurd/sendto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/sendto.c b/sysdeps/mach/hurd/sendto.c index 1d2e3ed9b5..ee459d7788 100644 --- a/sysdeps/mach/hurd/sendto.c +++ b/sysdeps/mach/hurd/sendto.c @@ -22,7 +22,7 @@ #include <hurd/fd.h> #include <hurd/ifsock.h> #include <hurd/socket.h> -#include <string.h> +#include "hurd/hurdsocket.h" /* Send N bytes of BUF on socket FD to peer at address ADDR (which is ADDR_LEN bytes long). Returns the number sent, or -1 for errors. */ @@ -48,7 +48,7 @@ __sendto (int fd, if (addr->sun_family == AF_LOCAL) { - char *name = strndupa (addr->sun_path, addr_len - offsetof (struct sockaddr_un, sun_path)); + char *name = _hurd_sun_path_dupa (addr, addr_len); /* For the local domain, we must look up the name as a file and talk to it with the ifsock protocol. */ file_t file = __file_name_lookup (name, 0, 0); |