]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Don't compile util/symlinks on Windows
authorTheodore Ts'o <tytso@mit.edu>
Thu, 6 Mar 2025 03:41:43 +0000 (22:41 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 6 Mar 2025 12:22:12 +0000 (07:22 -0500)
This helper program is only needed when building elf shared libraries,
and for some reason Windows is failing to compile POSIX's struct stat.
Windows doesn't support symlinks anyway.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
util/symlinks.c

index 4c721560d408f1d50411af4ec8dac4ff290d5dd5..4b0b788e0f4f30b19f4adb3dfdfa61360a2f8db0 100644 (file)
 #include <stddef.h>
 #include <errno.h>
 
+#if (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
+
+int main(int argc, char **argv)
+{
+       printf("symlinks not supported on Windows\n");
+       return 1;
+}
+
+#else
+
 #ifndef S_ISLNK
 #define S_ISLNK(mode) (((mode) & (_S_IFMT)) == (_S_IFLNK))
 #endif
@@ -381,3 +391,5 @@ int main(int argc, char **argv)
                usage_error();
        exit (0);
 }
+
+#endif /* !(defined _WIN32 || defined _WIN64 || defined __WINDOWS__) */