summaryrefslogtreecommitdiffhomepage
path: root/src/ac.c
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2023-08-20 16:20:03 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2023-08-27 00:46:09 +0100
commita1998f2f7ce4153d670e2e5cb5018366517cc1ca (patch)
tree4d899fbad24c728c0b51f183c61ed6a7fb213c04 /src/ac.c
parent38fa6c52a8a26ac178a3e1f80a8317740b8e82b3 (diff)
Get things at least compiling under Linux
Nothing really works yet, but at least test.h and fastspin are fixed and some of the issues with RTTI and libdl and stuff are maybe kind of sorted, subject to more testing later. The main issue now seems to be the cvar interface not quite lining up and crashing pretty much immediately. That'll probably take a lot more debugging to figure out, which likely still won't be a priority for quite a while.
Diffstat (limited to 'src/ac.c')
-rw-r--r--src/ac.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ac.c b/src/ac.c
index 263e114..228fa58 100644
--- a/src/ac.c
+++ b/src/ac.c
@@ -401,7 +401,7 @@ INIT {
if (madvise(keybox, 4096, MADV_DONTFORK) == -1 ||
madvise(keybox, 4096, MADV_DONTDUMP) == - 1 ||
mlock(keybox, 4096) == -1) {
- errormsg_errorstd("couldn't secure session state");
+ errmsg_errorstd("couldn't secure session state");
goto e;
}
// TODO(linux): call other init things
@@ -420,7 +420,7 @@ INIT {
#ifdef _WIN32
e: WerUnregisterExcludedMemoryBlock(keybox); // this'd better not fail!
e2: VirtualFree(keybox, 4096, MEM_RELEASE);
-#elif
+#else
e: munmap(keybox, 4096);
#endif
unhook_inline((void *)orig_DispatchInputEvent);
@@ -433,7 +433,7 @@ END {
WerUnregisterExcludedMemoryBlock(keybox); // this'd better not fail!
VirtualFree(keybox, 4096, MEM_RELEASE);
win32_end();
-#elif defined(__linux__)
+#else
munmap(keybox, 4096);
// TODO(linux): call other cleanup things
#endif