From 9e0b9ec23aad6352883e48dcee05978abf141dcc Mon Sep 17 00:00:00 2001 From: CodingKoopa Date: Fri, 8 Mar 2024 06:31:19 +0000 Subject: [PATCH] ntfsprogs: provide WINAPI definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copied from a header in the public domain. Fixes compiler error: ntfsusermap.c:149:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘LookupAccountNameA’ 149 | BOOL WINAPI LookupAccountNameA(const char*, const char*, void*, | ^~~~~~~~~~~~~~~~~~ ntfsusermap.c:151:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘GetUserNameA’ 151 | BOOL WINAPI GetUserNameA(char*, u32*); | ^~~~~~~~~~~~ --- ntfsprogs/ntfssecaudit.c | 10 ++++++++++ ntfsprogs/ntfsusermap.c | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/ntfsprogs/ntfssecaudit.c b/ntfsprogs/ntfssecaudit.c index 9484a605..25b136b8 100644 --- a/ntfsprogs/ntfssecaudit.c +++ b/ntfsprogs/ntfssecaudit.c @@ -434,6 +434,16 @@ struct SDH { /* this is an image of an $SDH index entry */ } ; #ifdef HAVE_WINDOWS_H + +// Copied from minwindef.h. +#ifndef WINAPI +#if defined(_ARM_) +#define WINAPI +#else +#define WINAPI __stdcall +#endif +#endif + /* * Including leads to numerous conflicts with layout.h * so define a few needed Windows calls unrelated to ntfs-3g diff --git a/ntfsprogs/ntfsusermap.c b/ntfsprogs/ntfsusermap.c index 6c1f61b8..b4c41070 100644 --- a/ntfsprogs/ntfsusermap.c +++ b/ntfsprogs/ntfsusermap.c @@ -142,6 +142,16 @@ #include "misc.h" #ifdef HAVE_WINDOWS_H + +// Copied from minwindef.h. +#ifndef WINAPI +#if defined(_ARM_) +#define WINAPI +#else +#define WINAPI __stdcall +#endif +#endif + /* * Including leads to numerous conflicts with layout.h * so define a few needed Windows calls unrelated to ntfs-3g