diff options
| author | sszlbg <[email protected]> | 2021-07-25 17:00:00 +0800 |
|---|---|---|
| committer | sszlbg <[email protected]> | 2021-07-25 17:00:00 +0800 |
| commit | bf88963a3ec85ce6da013e4cd1c59ec5041d29e1 (patch) | |
| tree | d4cd7d4fa3ff6e7b0c859a7660209787f47d168b /components/libc/pthreads | |
| parent | 88d4faf68735948d6310e2d2271d576c5de254a0 (diff) | |
| parent | 2b201cbb00c512def085332d7fb09194656418b9 (diff) | |
Merge branch 'master' into at_client-rt_realloc_iss
# Conflicts:
# components/net/at/src/at_client.c
Diffstat (limited to 'components/libc/pthreads')
| -rw-r--r-- | components/libc/pthreads/posix_types.h | 2 | ||||
| -rw-r--r-- | components/libc/pthreads/semaphore.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/components/libc/pthreads/posix_types.h b/components/libc/pthreads/posix_types.h index 942657ef39..5838e8b370 100644 --- a/components/libc/pthreads/posix_types.h +++ b/components/libc/pthreads/posix_types.h @@ -20,7 +20,7 @@ #include <sys/types.h> #include <sys/time.h> #include <unistd.h> -#include <errno.h> +#include <sys/errno.h> #include <fcntl.h> #endif diff --git a/components/libc/pthreads/semaphore.c b/components/libc/pthreads/semaphore.c index 398cdf1f49..199b33bfe8 100644 --- a/components/libc/pthreads/semaphore.c +++ b/components/libc/pthreads/semaphore.c @@ -186,7 +186,7 @@ int sem_init(sem_t *sem, int pshared, unsigned int value) rt_snprintf(name, sizeof(name), "psem%02d", psem_number++); sem->sem = rt_sem_create(name, value, RT_IPC_FLAG_FIFO); - if (sem == RT_NULL) + if (sem->sem == RT_NULL) { rt_set_errno(ENOMEM); |
