1
0

utsname.h 811 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) 2006-2023, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2023-03-27 xqyjlj add uname
  9. */
  10. #ifndef __SYS_UTSNAME_H__
  11. #define __SYS_UTSNAME_H__
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #ifdef RT_USING_MUSLLIBC
  16. /* this is required for musl <sys/utsname.h> */
  17. #ifndef _POSIX_SOURCE
  18. #define _POSIX_SOURCE
  19. #include_next <sys/utsname.h>
  20. /* limiting influence of _POSIX_SOURCE */
  21. #undef _POSIX_SOURCE
  22. #else /* def _POSIX_SOURCE */
  23. #include_next <sys/utsname.h>
  24. #endif
  25. #else
  26. struct utsname
  27. {
  28. char sysname[65];
  29. char nodename[65];
  30. char release[65];
  31. char version[65];
  32. char machine[65];
  33. char domainname[65];
  34. };
  35. int uname(struct utsname *);
  36. #endif
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif