Browse Source

libc: add mlock and munlock dummies

libc
Emery Hemingway 4 months ago
parent
commit
26d95dc1d3
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      repos/libports/src/lib/libc/dummies.cc

+ 6
- 0
repos/libports/src/lib/libc/dummies.cc View File

@@ -221,5 +221,11 @@ int __attribute__((weak)) madvise(void *addr, size_t length, int advice)
221 221
 
222 222
 const struct res_sym __p_type_syms[] = { };
223 223
 
224
+#define DUMMY_EPERM(ret_type, ret_val, name, args) __attribute__((weak)) \
225
+ret_type name args { errno = EPERM; return ret_val; }
226
+
227
+DUMMY_EPERM(int, -1,   mlock, (const void *, size_t));
228
+DUMMY_EPERM(int, -1, munlock, (const void *, size_t));
229
+
224 230
 } /* extern "C" */
225 231
 

Loading…
Cancel
Save