summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--README.md6
-rw-r--r--httpd.c23
2 files changed, 29 insertions, 0 deletions
diff --git a/README.md b/README.md
index 1e5c2e8..6c1e31b 100644
--- a/README.md
+++ b/README.md
@@ -71,6 +71,12 @@ If your compilation process complains about undefined references to `shm_open()`
71make LDFLAGS=-lrt 71make LDFLAGS=-lrt
72``` 72```
73 73
74If 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
75
76```sh
77make CFLAGS=-DWITHOUT_SHM
78```
79
74See the administrator manual on how to proceed from here. 80See the administrator manual on how to proceed from here.
75 81
76## Testing via Docker 82## Testing via Docker
diff --git a/httpd.c b/httpd.c
index d63fa0f..993aa1c 100644
--- a/httpd.c
+++ b/httpd.c
@@ -653,6 +653,29 @@ void term_handler(int s)
653} 653}
654 654
655 655
656#ifdef WITHOUT_SHM
657
658/* dummy versions */
659
660int shm_open(const char *name, int flags, mode_t mode)
661{
662 (void)name;
663 (void)flags;
664 (void)mode;
665
666 errno = ENOTSUP;
667 return -1;
668}
669
670int shm_unlink(const char *name)
671{
672 (void)name;
673 return -1;
674}
675
676
677#endif
678
656srv_state *srv_state_op(xs_str **fname, int op) 679srv_state *srv_state_op(xs_str **fname, int op)
657/* opens or deletes the shared memory object */ 680/* opens or deletes the shared memory object */
658{ 681{