un.h 472 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _SYS_UN_H
  2. #define _SYS_UN_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <features.h>
  7. #define __NEED_sa_family_t
  8. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  9. #define __NEED_size_t
  10. #endif
  11. #include <bits/alltypes.h>
  12. struct sockaddr_un {
  13. sa_family_t sun_family;
  14. char sun_path[108];
  15. };
  16. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  17. size_t strlen(const char *);
  18. #define SUN_LEN(s) (2+strlen((s)->sun_path))
  19. #endif
  20. #ifdef __cplusplus
  21. }
  22. #endif
  23. #endif