Skip to content

Commit

Permalink
initail struct stx var to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
sendaoYan committed Sep 9, 2024
1 parent 2db0988 commit 7a7916f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* that support it, tests using /tmp directory.
* @library ../.. /test/lib /java/foreign
* @build jdk.test.lib.Platform NativeTestHelper
* @run main/othervm --enable-native-access=ALL-UNNAMED CreationTime
* @run main/othervm/native --enable-native-access=ALL-UNNAMED CreationTime
*/

/* @test id=cwd
Expand All @@ -37,7 +37,7 @@
* scratch directory maybe at diff disk partition to /tmp on linux.
* @library ../.. /test/lib /java/foreign
* @build jdk.test.lib.Platform NativeTestHelper
* @run main/othervm --enable-native-access=ALL-UNNAMED CreationTime .
* @run main/othervm/native --enable-native-access=ALL-UNNAMED CreationTime .
*/

import java.lang.foreign.Linker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ static statx_func* my_statx_func = NULL;
// static boolean linuxIsCreationTimeSupported(char* file)
EXPORT bool linuxIsCreationTimeSupported(char* file) {
#if defined(__linux__)
struct my_statx stx;
struct my_statx stx = {0};
int ret, atflag = AT_SYMLINK_NOFOLLOW;
memset(&stx, 0xbf, sizeof(stx));
unsigned int mask = STATX_BASIC_STATS | STATX_BTIME;

my_statx_func = (statx_func*) dlsym(RTLD_DEFAULT, "statx");
Expand Down

0 comments on commit 7a7916f

Please sign in to comment.