Skip to content

Commit

Permalink
posix: Add support for arm-clang libc
Browse files Browse the repository at this point in the history
Add CONFIG_ARMCLANG_STD_LIBC to places they are needed for things
to build correct when compiling with arm-clang.

Signed-off-by: Kumar Gala <[email protected]>
  • Loading branch information
galak authored and nashif committed Apr 6, 2023
1 parent 148c0e1 commit eee12fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions include/zephyr/posix/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct pthread_attr {
int32_t detachstate;
uint32_t initialized;
};
#if defined(CONFIG_MINIMAL_LIBC) || defined(CONFIG_PICOLIBC)
#if defined(CONFIG_MINIMAL_LIBC) || defined(CONFIG_PICOLIBC) || defined(CONFIG_ARMCLANG_STD_LIBC)
typedef struct pthread_attr pthread_attr_t;
#endif
BUILD_ASSERT(sizeof(pthread_attr_t) >= sizeof(struct pthread_attr));
Expand All @@ -63,7 +63,7 @@ typedef uint32_t pthread_mutex_t;
struct pthread_mutexattr {
int type;
};
#if defined(CONFIG_MINIMAL_LIBC) || defined(CONFIG_PICOLIBC)
#if defined(CONFIG_MINIMAL_LIBC) || defined(CONFIG_PICOLIBC) || defined(CONFIG_ARMCLANG_STD_LIBC)
typedef struct pthread_mutexattr pthread_mutexattr_t;
#endif
BUILD_ASSERT(sizeof(pthread_mutexattr_t) >= sizeof(struct pthread_mutexattr));
Expand All @@ -74,7 +74,7 @@ typedef uint32_t pthread_cond_t;
struct pthread_condattr {
};

#if defined(CONFIG_MINIMAL_LIBC) || defined(CONFIG_PICOLIBC)
#if defined(CONFIG_MINIMAL_LIBC) || defined(CONFIG_PICOLIBC) || defined(CONFIG_ARMCLANG_STD_LIBC)
typedef struct pthread_condattr pthread_condattr_t;
#endif
BUILD_ASSERT(sizeof(pthread_condattr_t) >= sizeof(struct pthread_condattr));
Expand Down
2 changes: 1 addition & 1 deletion include/zephyr/posix/pthread_key.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
extern "C" {
#endif

#if defined(CONFIG_MINIMAL_LIBC) || defined(CONFIG_PICOLIBC)
#if defined(CONFIG_MINIMAL_LIBC) || defined(CONFIG_PICOLIBC) || defined(CONFIG_ARMCLANG_STD_LIBC)
typedef struct {
int is_initialized;
int init_executed;
Expand Down
2 changes: 1 addition & 1 deletion include/zephyr/posix/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extern "C" {
/* Priority based preemptive scheduling policy */
#define SCHED_RR 2

#if defined(CONFIG_MINIMAL_LIBC) || defined(CONFIG_PICOLIBC)
#if defined(CONFIG_MINIMAL_LIBC) || defined(CONFIG_PICOLIBC) || defined(CONFIG_ARMCLANG_STD_LIBC)
struct sched_param {
int sched_priority;
};
Expand Down

0 comments on commit eee12fa

Please sign in to comment.