build: fix compile error with uClibc
uClibc does not have header "gnu/libc-version.h" PR-URL: https://github.com/libuv/libuv/pull/2329 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
a5ffb50dd7
commit
60526073b6
@ -37,7 +37,7 @@
|
||||
#include <sys/sem.h>
|
||||
#endif
|
||||
|
||||
#ifdef __GLIBC__
|
||||
#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
#include <gnu/libc-version.h> /* gnu_get_libc_version() */
|
||||
#endif
|
||||
|
||||
@ -481,7 +481,7 @@ int uv_sem_trywait(uv_sem_t* sem) {
|
||||
|
||||
#else /* !(defined(__APPLE__) && defined(__MACH__)) */
|
||||
|
||||
#ifdef __GLIBC__
|
||||
#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
|
||||
/* Hack around https://sourceware.org/bugzilla/show_bug.cgi?id=12674
|
||||
* by providing a custom implementation for glibc < 2.21 in terms of other
|
||||
@ -517,7 +517,8 @@ typedef struct uv_semaphore_s {
|
||||
unsigned int value;
|
||||
} uv_semaphore_t;
|
||||
|
||||
#if defined(__GLIBC__) || platform_needs_custom_semaphore
|
||||
#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || \
|
||||
platform_needs_custom_semaphore
|
||||
STATIC_ASSERT(sizeof(uv_sem_t) >= sizeof(uv_semaphore_t*));
|
||||
#endif
|
||||
|
||||
@ -646,7 +647,7 @@ static int uv__sem_trywait(uv_sem_t* sem) {
|
||||
}
|
||||
|
||||
int uv_sem_init(uv_sem_t* sem, unsigned int value) {
|
||||
#ifdef __GLIBC__
|
||||
#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
uv_once(&glibc_version_check_once, glibc_version_check);
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user