mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8056039: Hotspot does not compile with clang 3.4 on Linux
Reviewed-by: brutisso, sla
This commit is contained in:
parent
b9d46eee2c
commit
a2d9ba3fd6
7 changed files with 7 additions and 45 deletions
|
@ -4729,27 +4729,6 @@ void os::make_polling_page_readable(void) {
|
|||
|
||||
bool os::check_heap(bool force) { return true; }
|
||||
|
||||
typedef int (*vsnprintf_t)(char* buf, size_t count, const char* fmt, va_list argptr);
|
||||
static vsnprintf_t sol_vsnprintf = NULL;
|
||||
|
||||
int local_vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr) {
|
||||
if (!sol_vsnprintf) {
|
||||
//search for the named symbol in the objects that were loaded after libjvm
|
||||
void* where = RTLD_NEXT;
|
||||
if ((sol_vsnprintf = CAST_TO_FN_PTR(vsnprintf_t, dlsym(where, "__vsnprintf"))) == NULL)
|
||||
sol_vsnprintf = CAST_TO_FN_PTR(vsnprintf_t, dlsym(where, "vsnprintf"));
|
||||
if (!sol_vsnprintf){
|
||||
//search for the named symbol in the objects that were loaded before libjvm
|
||||
where = RTLD_DEFAULT;
|
||||
if ((sol_vsnprintf = CAST_TO_FN_PTR(vsnprintf_t, dlsym(where, "__vsnprintf"))) == NULL)
|
||||
sol_vsnprintf = CAST_TO_FN_PTR(vsnprintf_t, dlsym(where, "vsnprintf"));
|
||||
assert(sol_vsnprintf != NULL, "vsnprintf not found");
|
||||
}
|
||||
}
|
||||
return (*sol_vsnprintf)(buf, count, fmt, argptr);
|
||||
}
|
||||
|
||||
|
||||
// Is a (classpath) directory empty?
|
||||
bool os::dir_is_empty(const char* path) {
|
||||
DIR *dir = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue