aboutsummaryrefslogtreecommitdiff
path: root/compat/mingw.c
diff options
context:
space:
mode:
authorJiang Xin <worldhello.net@gmail.com>2022-01-17 08:30:45 +0800
committerJiang Xin <worldhello.net@gmail.com>2022-01-17 08:30:45 +0800
commit90999dd6864e63c23fabe2f4263c5e4ed70bd8f5 (patch)
tree65a20b6daeeb4cc9b9c95a4877b7f5745b96c46e /compat/mingw.c
parentc8464a3df9f4ae64301f4c187d27cfa6344b3e65 (diff)
parentdf3c41adeb212432c53d93ce6ace5d5374dc6e11 (diff)
downloadgit-90999dd6864e63c23fabe2f4263c5e4ed70bd8f5.tar.xz
Merge tag 'v2.35.0-rc1'
Git 2.35-rc1 * tag 'v2.35.0-rc1': Git 2.35-rc1 reftable tests: avoid "int" overflow, use "uint64_t" reftable: avoid initializing structs from structs t1450-fsck: exec-bit is not needed to make loose object writable refs API: use "failure_errno", not "errno" Last minute fixes before -rc1 build: NonStop ships with an older zlib packfile: fix off-by-one error in decoding logic t/gpg: simplify test for unknown key branch: missing space fix at line 313 fmt-merge-msg: prevent use-after-free with signed tags cache.h: drop duplicate `ensure_full_index()` declaration lazyload: use correct calling conventions fetch: fix deadlock when cleaning up lockfiles in async signals
Diffstat (limited to 'compat/mingw.c')
-rw-r--r--compat/mingw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index e14f2d5f77..640dcb11de 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -8,6 +8,8 @@
#include "win32/lazyload.h"
#include "../config.h"
#include "dir.h"
+#define SECURITY_WIN32
+#include <sspi.h>
#define HCAST(type, handle) ((type)(intptr_t)handle)
@@ -1008,7 +1010,7 @@ size_t mingw_strftime(char *s, size_t max,
/* a pointer to the original strftime in case we can't find the UCRT version */
static size_t (*fallback)(char *, size_t, const char *, const struct tm *) = strftime;
size_t ret;
- DECLARE_PROC_ADDR(ucrtbase.dll, size_t, strftime, char *, size_t,
+ DECLARE_PROC_ADDR(ucrtbase.dll, size_t, __cdecl, strftime, char *, size_t,
const char *, const struct tm *);
if (INIT_PROC_ADDR(strftime))
@@ -2185,7 +2187,7 @@ enum EXTENDED_NAME_FORMAT {
static char *get_extended_user_info(enum EXTENDED_NAME_FORMAT type)
{
- DECLARE_PROC_ADDR(secur32.dll, BOOL, GetUserNameExW,
+ DECLARE_PROC_ADDR(secur32.dll, BOOL, SEC_ENTRY, GetUserNameExW,
enum EXTENDED_NAME_FORMAT, LPCWSTR, PULONG);
static wchar_t wbuffer[1024];
DWORD len;