From: Theodore Ts'o Date: Thu, 6 Mar 2025 03:41:43 +0000 (-0500) Subject: Don't compile util/symlinks on Windows X-Git-Tag: v1.47.3-rc1~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d41d03671fc4acf2e069b962a3e7e087360ef2f;p=thirdparty%2Fe2fsprogs.git Don't compile util/symlinks on Windows 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 --- diff --git a/util/symlinks.c b/util/symlinks.c index 4c721560..4b0b788e 100644 --- a/util/symlinks.c +++ b/util/symlinks.c @@ -17,6 +17,16 @@ #include #include +#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__) */