@@ -343,22 +343,21 @@ Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this)
343343
344344 /* system calls that might not be available at run time */
345345
346- #if defined(_ALLBSD_SOURCE )
347- my_openat_func = (openat_func * ) openat ;
348- my_fstatat_func = (fstatat_func * ) fstatat ;
349- #else
350- // Make sure we link to the 64-bit version of the functions
351- my_openat_func = (openat_func * ) dlsym (RTLD_DEFAULT , "openat64" );
352- my_fstatat_func = (fstatat_func * ) dlsym (RTLD_DEFAULT , "fstatat64" );
353- #endif
354346 my_unlinkat_func = (unlinkat_func * ) dlsym (RTLD_DEFAULT , "unlinkat" );
355347 my_renameat_func = (renameat_func * ) dlsym (RTLD_DEFAULT , "renameat" );
356348#if defined(_AIX )
357349 // Make sure we link to the 64-bit version of the function
350+ my_openat_func = (openat_func * ) dlsym (RTLD_DEFAULT , "open64at" );
351+ my_fstatat_func = (fstatat_func * ) dlsym (RTLD_DEFAULT , "stat64at" );
358352 my_fdopendir_func = (fdopendir_func * ) dlsym (RTLD_DEFAULT , "fdopendir64" );
359353#elif defined(_ALLBSD_SOURCE )
354+ my_openat_func = (openat_func * ) openat ;
355+ my_fstatat_func = (fstatat_func * ) fstatat ;
360356 my_fdopendir_func = (fdopendir_func * ) fdopendir ;
361357#else
358+ // Make sure we link to the 64-bit version of the functions
359+ my_openat_func = (openat_func * ) dlsym (RTLD_DEFAULT , "openat64" );
360+ my_fstatat_func = (fstatat_func * ) dlsym (RTLD_DEFAULT , "fstatat64" );
362361 my_fdopendir_func = (fdopendir_func * ) dlsym (RTLD_DEFAULT , "fdopendir" );
363362#endif
364363
0 commit comments