un.h 472 B

1234567891011121314151617181920212223242526272829303132
  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. {
  14. sa_family_t sun_family;
  15. char sun_path[108];
  16. };
  17. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  18. size_t strlen(const char *);
  19. #define SUN_LEN(s) (2+strlen((s)->sun_path))
  20. #endif
  21. #ifdef __cplusplus
  22. }
  23. #endif
  24. #endif