OLD | NEW |
1 /* olonho */ | 1 /* |
| 2 * Copyright 2015 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. |
| 5 */ |
2 #ifndef GLIBCEMU_SYS_UN_H | 6 #ifndef GLIBCEMU_SYS_UN_H |
3 #define GLIBCEMU_SYS_UN_H 1 | 7 #define GLIBCEMU_SYS_UN_H 1 |
4 | 8 |
5 #include <sys/socket.h> | 9 #include <sys/socket.h> |
6 | 10 |
7 struct sockaddr_un { | 11 struct sockaddr_un { |
8 sa_family_t sun_family; /* address family */ | 12 sa_family_t sun_family; /* address family */ |
9 char sun_path[108]; | 13 char sun_path[108]; |
10 }; | 14 }; |
11 | 15 |
| 16 /* pulled from freebsd 10.1 sys/sys/un.h */ |
| 17 /* actual length of an initialized sockaddr_un */ |
| 18 #define SUN_LEN(su) \ |
| 19 (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path)) |
| 20 |
12 #endif /* GLIBCEMU_SYS_UN_H */ | 21 #endif /* GLIBCEMU_SYS_UN_H */ |
13 /* end of olonho */ | |
14 | |
OLD | NEW |