summaryrefslogtreecommitdiff
path: root/utility/rtos_compatibility_layers/posix/tx_posix.h
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-10-02 10:42:44 -0400
committerGitHub <[email protected]>2026-10-02 10:42:44 -0400
commit93387b0a60382a29579bbad5045c68328e3751df (patch)
tree42be790d602cb76f55090e5a7c418df7ea2b3428 /utility/rtos_compatibility_layers/posix/tx_posix.h
parent44d7c95c582d415c4ad84527180b29c93c3bf664 (diff)
parent28281cd5647d4671236ca08d19bd18ed15b2265a (diff)
Merge pull request #783 from eclipse-threadx/devv6.5.2.202603_rel
Merged changes ahead of the v6.5.2.202603 release
Diffstat (limited to 'utility/rtos_compatibility_layers/posix/tx_posix.h')
-rw-r--r--utility/rtos_compatibility_layers/posix/tx_posix.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/utility/rtos_compatibility_layers/posix/tx_posix.h b/utility/rtos_compatibility_layers/posix/tx_posix.h
index ce533dd8..3f235cb9 100644
--- a/utility/rtos_compatibility_layers/posix/tx_posix.h
+++ b/utility/rtos_compatibility_layers/posix/tx_posix.h
@@ -278,9 +278,22 @@ typedef struct pthread_attr_obj
} pthread_attr_t;
-typedef INT ssize_t ; /* this should be pulled in from sys\types.h */
+/* ssize_t and mode_t belong to <sys/types.h>. A C library that has already
+ declared them wins: it knows the target's real widths, and on an LP64 target
+ ssize_t is 64 bits while INT is not. newlib guards each type with its own
+ _*_DECLARED macro, so honour those and only define what is missing. A port
+ whose library uses different guards can predefine them to the same effect. */
+#ifndef _SSIZE_T_DECLARED
+typedef INT ssize_t ;
+#define _SSIZE_T_DECLARED
+#endif
+
typedef ALIGN_TYPE pthread_t;
+
+#ifndef _MODE_T_DECLARED
typedef ULONG mode_t;
+#define _MODE_T_DECLARED
+#endif