Skip to content

Commit

Permalink
Patch embedded filelock
Browse files Browse the repository at this point in the history
To work around `printf()` format string issue.
  • Loading branch information
gaborcsardi committed Dec 10, 2023
1 parent c6dfd6b commit 73d208f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/library/filelock.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}
2 changes: 1 addition & 1 deletion src/library/filelock/src/filelock-windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}
Expand Down

0 comments on commit 73d208f

Please sign in to comment.