]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
windows: Extend CreateSymbolicLinkW guard 3112/head
authorTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 2 Jun 2026 20:28:33 +0000 (22:28 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 2 Jun 2026 20:28:33 +0000 (22:28 +0200)
Add WINDOWS_PARTITION_SYSTEM to guard for extended supported.
Reported by Duncan Horn.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/archive_windows.h
libarchive/archive_write_disk_windows.c

index 0d6fe8f73273964a119a7231795ef3553609ca8a..38a2b1b62dde889c2c6fa4e9d3e45d85e440965b 100644 (file)
@@ -307,6 +307,10 @@ size_t wcrtomb(char *, wchar_t, mbstate_t *);
 #define WINAPI_PARTITION_DESKTOP 1
 #endif
 
+#ifndef WINAPI_PARTITION_SYSTEM
+#define WINAPI_PARTITION_SYSTEM 1
+#endif
+
 #ifndef NTDDI_VERSION
 #define NTDDI_VERSION  0x05020000
 #endif
index 93156a7cdf218e575d991caef39967299f78797a..17f09e09164bea5bee43214a447de5b841849227 100644 (file)
@@ -667,7 +667,7 @@ la_CreateSymbolicLinkW(const wchar_t *linkname, const wchar_t *target,
                f = la_GetFunctionKernel32("CreateSymbolicLinkW");
        }
 #else
-# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
        f = CreateSymbolicLinkW;
 # else
        f = NULL;