From 7d1c1ad3ca540589faa524fef1f7a39bd6160a53 Mon Sep 17 00:00:00 2001 From: CodingKoopa Date: Fri, 8 Mar 2024 06:07:04 +0000 Subject: [PATCH] win32_io.c: make NTSTATUS signed bcrypt.h defines this as a long, which causes a conflict. On LLP64, long and u32 are the same size, but have different signedness. Signed seems to be the prevailing view of the type. Fixes compiler error: win32_io.c:174:13: error: conflicting types for 'NTSTATUS'; have 'u32' {aka 'unsigned int'} 174 | typedef u32 NTSTATUS; /* do not let the compiler choose the size */ | ^~~~~~~~ In file included from /usr/include/w32api/wincrypt.h:846, from /usr/include/w32api/windows.h:95, from win32_io.c:31: /usr/include/w32api/bcrypt.h:27:16: note: previous declaration of 'NTSTATUS' with type 'NTSTATUS' {aka 'int'} 27 | typedef LONG NTSTATUS,*PNTSTATUS; | ^~~~~~~~ --- libntfs-3g/win32_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libntfs-3g/win32_io.c b/libntfs-3g/win32_io.c index d6783ead..20976686 100644 --- a/libntfs-3g/win32_io.c +++ b/libntfs-3g/win32_io.c @@ -171,7 +171,7 @@ enum { /* see http://msdn.microsoft.com/en-us/library/cc704588(v=prot.10).aspx * STATUS_GUARD_PAGE_VIOLATION = 0x80000001 } ; -typedef u32 NTSTATUS; /* do not let the compiler choose the size */ +typedef s32 NTSTATUS; /* do not let the compiler choose the size */ #ifdef __x86_64__ typedef unsigned long long ULONG_PTR; /* an integer the same size as a pointer */ #else