commit cdfaf6d

default  ·  2024-05-21 16:57:13 +0000 UTC
parent 4777fc8
New compilation variable WITHOUT_SHM, to disable shared memory functions.
2 files changed,  +29, -0
+6, -0
 1@@ -71,6 +71,12 @@ If your compilation process complains about undefined references to `shm_open()`
 2 make LDFLAGS=-lrt
 3 ```
 4 
 5+If it still doesn't work (because your system does not implement the shared memory functions) or you are just not interested, you can compile out with
 6+
 7+```sh
 8+make CFLAGS=-DWITHOUT_SHM
 9+```
10+
11 See the administrator manual on how to proceed from here.
12 
13 ## Testing via Docker
+23, -0
 1@@ -653,6 +653,29 @@ void term_handler(int s)
 2 }
 3 
 4 
 5+#ifdef WITHOUT_SHM
 6+
 7+/* dummy versions */
 8+
 9+int shm_open(const char *name, int flags, mode_t mode)
10+{
11+    (void)name;
12+    (void)flags;
13+    (void)mode;
14+
15+    errno = ENOTSUP;
16+    return -1;
17+}
18+
19+int shm_unlink(const char *name)
20+{
21+    (void)name;
22+    return -1;
23+}
24+
25+
26+#endif
27+
28 srv_state *srv_state_op(xs_str **fname, int op)
29 /* opens or deletes the shared memory object */
30 {