mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
New compilation variable WITHOUT_SHM, to disable shared memory functions.
This commit is contained in:
parent
4777fc86cb
commit
cdfaf6dc57
2 changed files with 29 additions and 0 deletions
|
@ -71,6 +71,12 @@ If your compilation process complains about undefined references to `shm_open()`
|
||||||
make LDFLAGS=-lrt
|
make LDFLAGS=-lrt
|
||||||
```
|
```
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make CFLAGS=-DWITHOUT_SHM
|
||||||
|
```
|
||||||
|
|
||||||
See the administrator manual on how to proceed from here.
|
See the administrator manual on how to proceed from here.
|
||||||
|
|
||||||
## Testing via Docker
|
## Testing via Docker
|
||||||
|
|
23
httpd.c
23
httpd.c
|
@ -653,6 +653,29 @@ void term_handler(int s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef WITHOUT_SHM
|
||||||
|
|
||||||
|
/* dummy versions */
|
||||||
|
|
||||||
|
int shm_open(const char *name, int flags, mode_t mode)
|
||||||
|
{
|
||||||
|
(void)name;
|
||||||
|
(void)flags;
|
||||||
|
(void)mode;
|
||||||
|
|
||||||
|
errno = ENOTSUP;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int shm_unlink(const char *name)
|
||||||
|
{
|
||||||
|
(void)name;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
srv_state *srv_state_op(xs_str **fname, int op)
|
srv_state *srv_state_op(xs_str **fname, int op)
|
||||||
/* opens or deletes the shared memory object */
|
/* opens or deletes the shared memory object */
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue