From 73d208f8daef7d8515b40307122dd08d64738b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Mon, 11 Dec 2023 00:01:03 +0100 Subject: [PATCH] Patch embedded filelock To work around `printf()` format string issue. --- src/library/filelock.patch | 13 +++++++++++++ src/library/filelock/src/filelock-windows.c | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/library/filelock.patch b/src/library/filelock.patch index e08fd9d0e..3da40719c 100644 --- a/src/library/filelock.patch +++ b/src/library/filelock.patch @@ -11,3 +11,16 @@ index f1e4aae7..5fa7cc2f 100644 return !(R_ToplevelExec(filelock__check_interrupt_fn, NULL)); } +diff --git a/src/library/filelock/src/filelock-windows.c b/src/library/filelock/src/filelock-windows.c +index 5fa7cc2f..5467df5f 100644 +--- a/src/library/filelock/src/filelock-windows.c ++++ b/src/library/filelock/src/filelock-windows.c +@@ -106,7 +106,7 @@ int filelock__lock_wait(HANDLE file, int exclusive) { + CloseHandle(ov.hEvent); + UnlockFileEx(file, 0, 1, 0, &ov); /* ignore errors */ + CloseHandle(file); /* ignore errors */ +- error("Locking interrupted", 1); ++ error("Locking interrupted"); + } + } + } diff --git a/src/library/filelock/src/filelock-windows.c b/src/library/filelock/src/filelock-windows.c index 5fa7cc2f3..5467df5f5 100644 --- a/src/library/filelock/src/filelock-windows.c +++ b/src/library/filelock/src/filelock-windows.c @@ -106,7 +106,7 @@ int filelock__lock_wait(HANDLE file, int exclusive) { CloseHandle(ov.hEvent); UnlockFileEx(file, 0, 1, 0, &ov); /* ignore errors */ CloseHandle(file); /* ignore errors */ - error("Locking interrupted", 1); + error("Locking interrupted"); } } }