commit | 95b0680cde4ddc4cea4c01a1f681b13f50242221 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Fri Aug 12 10:28:52 2016 -0700 |
committer | Elliott Hughes <enh@google.com> | Fri Aug 12 10:28:52 2016 -0700 |
tree | 5ea4f24bca7b179678007ea88a0f542ffd2bb953 | |
parent | 166f875eabdd2b7c508fc4ed1789a0d37fb1bdce [diff] |
POSIX says SEM_FAILED shall have type sem_t*. http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/semaphore.h.html (Even if it didn't, this header previously referred to NULL without ensuring that NULL was actually visible.) Change-Id: I70577f4afc21f32c9e585076986127899ef8c8c1
diff --git a/libc/include/semaphore.h b/libc/include/semaphore.h index 4ef13af..218f22a 100644 --- a/libc/include/semaphore.h +++ b/libc/include/semaphore.h
@@ -42,7 +42,7 @@ #endif } sem_t; -#define SEM_FAILED NULL +#define SEM_FAILED __BIONIC_CAST(reinterpret_cast, sem_t*, 0) int sem_destroy(sem_t*); int sem_getvalue(sem_t*, int*);