Skip to content

Commit

Permalink
fix compile error: libCreationTimeHelper.c:24:10: fatal error: 'linux…
Browse files Browse the repository at this point in the history
…/fcntl.h' file not found on windows and macos
  • Loading branch information
sendaoYan committed Sep 4, 2024
1 parent 614603e commit f838ddf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* that support it, tests using /tmp directory.
* @library ../.. /test/lib
* @build jdk.test.lib.Platform
* @run main CreationTime
* @run main/native CreationTime
*/

/* @test id=cwd
Expand All @@ -36,7 +36,7 @@
* scratch directory maybe at diff disk partition to /tmp on linux.
* @library ../.. /test/lib
* @build jdk.test.lib.Platform
* @run main CreationTime .
* @run main/native CreationTime .
*/

import java.lang.foreign.Linker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* questions.
*/
#include "jni.h"
#if defined(__linux__)
#include <linux/fcntl.h>
#include <stdio.h>
#include <string.h>
Expand Down Expand Up @@ -78,13 +79,11 @@ struct my_statx
__uint64_t __statx_pad2[14];
};

#if defined(__linux__)
typedef int statx_func(int dirfd, const char *restrict pathname, int flags,
unsigned int mask, struct my_statx *restrict statxbuf);
#endif
#if defined(__linux__)

static statx_func* my_statx_func = NULL;
#endif
#endif //#defined(__linux__)

// static native boolean linuxIsCreationTimeSupported()
JNIEXPORT jboolean JNICALL
Expand Down

0 comments on commit f838ddf

Please sign in to comment.