2
0
Fork 0
Browse Source

libc: add mlock and munlock dummies

ncurses
Emery Hemingway 2 years ago
parent
commit
2d0ba4b8a0
  1. 26
      packages/genodelabs/libc.patch

26
packages/genodelabs/libc.patch

@ -38,3 +38,29 @@ index 8e75e59589..2bb98b1456 100644
SRC_C = $(filter-out $(FILTER_OUT),$(notdir $(wildcard $(LIBC_LOCALE_DIR)/*.c)))
commit 81fc78f8e0ac66a7275e149f7f7fdc5f4f1f2979
Author: Emery Hemingway <ehmry@posteo.net>
Date: Wed May 27 16:35:16 2020 +0530
libc: add mlock and munlock dummies
diff --git a/repos/libports/src/lib/libc/dummies.cc b/repos/libports/src/lib/libc/dummies.cc
index 37c2c83f89..bc2f15a90a 100644
--- a/repos/libports/src/lib/libc/dummies.cc
+++ b/repos/libports/src/lib/libc/dummies.cc
@@ -221,5 +221,15 @@ int __attribute__((weak)) madvise(void *addr, size_t length, int advice)
const struct res_sym __p_type_syms[] = { };
+#define DUMMY_EPERM(ret_type, ret_val, name, args) __attribute__((weak)) \
+ret_type name args \
+{ \
+ errno = EPERM; \
+ return ret_val; \
+}
+
+DUMMY_EPERM(int, -1, mlock, (const void *, size_t));
+DUMMY_EPERM(int, -1, munlock, (const void *, size_t));
+
} /* extern "C" */

Loading…
Cancel
Save