summaryrefslogtreecommitdiffstats
path: root/include/mingw/sys/stat.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mingw/sys/stat.h')
-rw-r--r--include/mingw/sys/stat.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/mingw/sys/stat.h b/include/mingw/sys/stat.h
new file mode 100644
index 0000000..0ca1d1b
--- /dev/null
+++ b/include/mingw/sys/stat.h
@@ -0,0 +1,20 @@
+
+#pragma once
+
+#if HAVE_SYS_STAT_H
+#include_next <sys/stat.h>
+#endif
+
+#ifndef lstat
+#define lstat stat
+#endif
+
+#ifndef S_ISLNK
+#ifdef __S_IFLNK
+#define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
+#else
+#define S_ISLNK(mode) 0
+#endif
+#endif
+
+#define link(a, b) CreateHardLink((a), (b), NULL)