< prev index next >

src/os/linux/vm/os_linux.cpp

Print this page

        

*** 93,103 **** --- 93,105 ---- # include <semaphore.h> # include <fcntl.h> # include <string.h> # include <syscall.h> # include <sys/sysinfo.h> + #ifndef __UCLIBC__ # include <gnu/libc-version.h> + #endif # include <sys/ipc.h> # include <sys/shm.h> # include <link.h> # include <stdint.h> # include <inttypes.h>
*** 596,610 **** --- 598,618 ---- if (n > 0) { char *str = (char *)malloc(n, mtInternal); confstr(_CS_GNU_LIBC_VERSION, str, n); os::Linux::set_glibc_version(str); } else { + #ifndef __UCLIBC__ // _CS_GNU_LIBC_VERSION is not supported, try gnu_get_libc_version() static char _gnu_libc_version[32]; jio_snprintf(_gnu_libc_version, sizeof(_gnu_libc_version), "glibc %s %s", gnu_get_libc_version(), gnu_get_libc_release()); os::Linux::set_glibc_version(_gnu_libc_version); + #else + #define STRFY(s) #s + os::Linux::set_glibc_version("uclibc " STRFY(__UCLIB_MAJOR__) "." STRFY(__UCLIBC_MINOR__) " stable"); + #undef STRFY + #endif } n = confstr(_CS_GNU_LIBPTHREAD_VERSION, NULL, 0); if (n > 0) { char *str = (char *)malloc(n, mtInternal);
*** 2934,2948 **** --- 2942,2960 ---- extern "C" JNIEXPORT int fork1() { return fork(); } // Handle request to load libnuma symbol version 1.1 (API v1). If it fails // load symbol from base version instead. void* os::Linux::libnuma_dlsym(void* handle, const char *name) { + #ifndef __UCLIBC__ void *f = dlvsym(handle, name, "libnuma_1.1"); if (f == NULL) { f = dlsym(handle, name); } return f; + #else + return dlsym(handle, name); + #endif } // Handle request to load libnuma symbol version 1.2 (API v2) only. // Return NULL if the symbol is not defined in this particular version. void* os::Linux::libnuma_v2_dlsym(void* handle, const char* name) {
*** 5838,5848 **** --- 5850,5864 ---- // System loadavg support. Returns -1 if load average cannot be obtained. // Linux doesn't yet have a (official) notion of processor sets, // so just return the system wide load average. int os::loadavg(double loadavg[], int nelem) { + #ifndef __UCLIBC__ return ::getloadavg(loadavg, nelem); + #else + return -1; + #endif } void os::pause() { char filename[MAX_PATH]; if (PauseAtStartupFile && PauseAtStartupFile[0]) {
< prev index next >