[rtems-libbsd commit] libc: Include <sys/types.h> for RTEMS

Sebastian Huber sebh at rtems.org
Wed May 18 07:43:08 UTC 2022


Module:    rtems-libbsd
Branch:    6-freebsd-12
Commit:    83a979855ac9743b3f3a1286a1a9b7232eb746ce
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=83a979855ac9743b3f3a1286a1a9b7232eb746ce

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed May 18 09:38:12 2022 +0200

libc: Include <sys/types.h> for RTEMS

This fixes an issue with a recent Newlib which no longer includes <sys/types.h>
in <stdio.h>.

---

 freebsd/lib/libc/include/libc_private.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/freebsd/lib/libc/include/libc_private.h b/freebsd/lib/libc/include/libc_private.h
index fb3a4bb2..4a699e93 100644
--- a/freebsd/lib/libc/include/libc_private.h
+++ b/freebsd/lib/libc/include/libc_private.h
@@ -36,8 +36,12 @@
 
 #ifndef _LIBC_PRIVATE_H_
 #define _LIBC_PRIVATE_H_
+#ifndef __rtems__
 #include <sys/_types.h>
 #include <sys/_pthreadtypes.h>
+#else /* __rtems__ */
+#include <sys/types.h>
+#endif /* __rtems__ */
 
 /*
  * This global flag is non-zero when a process has created one



More information about the vc mailing list