diff --git a/components/libc/posix/pthreads/pthread_barrier.c b/components/libc/posix/pthreads/pthread_barrier.c index 823a2158e0..f2c0e2d1c3 100644 --- a/components/libc/posix/pthreads/pthread_barrier.c +++ b/components/libc/posix/pthreads/pthread_barrier.c @@ -45,7 +45,10 @@ int pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared) if (!attr) return EINVAL; if (pshared == PTHREAD_PROCESS_PRIVATE) - attr = PTHREAD_PROCESS_PRIVATE; + { + *attr = PTHREAD_PROCESS_PRIVATE; + return 0; + } return EINVAL; }