From f15a46fcd42cd81dce748753dbe4ec82720e793a Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Fri, 17 Apr 2026 09:42:35 +0200 Subject: [PATCH] - Fix to compile the shm code when there is no shmget. --- doc/Changelog | 1 + util/shm_side/shm_main.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/doc/Changelog b/doc/Changelog index 478a549cd..af03f1b81 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -3,6 +3,7 @@ from a clang analyzer warning. - Fix setup of ssl context copy, to check for the tls service pem option for stat calls. + - Fix to compile the shm code when there is no shmget. 16 April 2026: Yorgos - Merge #1406: Introduce new 'tls-protocols' configuration option. diff --git a/util/shm_side/shm_main.c b/util/shm_side/shm_main.c index 420adbbda..ec0231b12 100644 --- a/util/shm_side/shm_main.c +++ b/util/shm_side/shm_main.c @@ -234,6 +234,7 @@ void shm_main_shutdown(struct daemon* daemon) #endif /* HAVE_SHMGET */ } +#ifdef HAVE_SHMGET /** Copy general info into the stat structure. */ static void shm_general_info(struct worker* worker) @@ -284,7 +285,9 @@ shm_general_info(struct worker* worker) shm_stat->mem.dynlib = (long long)mod_get_mem(&worker->env, "dynlib"); #endif } +#endif /* HAVE_SHMGET */ +#ifdef HAVE_SHMGET /** See if the thread is first. Caller has lock. */ static int shm_thread_is_first(struct shm_main_info* shm_info, int thread_num, @@ -321,7 +324,9 @@ shm_thread_is_first(struct shm_main_info* shm_info, int thread_num, } return 0; } +#endif /* HAVE_SHMGET */ +#ifdef HAVE_SHMGET /** See if the thread is last. Caller has lock. */ static int shm_thread_is_last(struct daemon* daemon) @@ -336,6 +341,7 @@ shm_thread_is_last(struct daemon* daemon) } return 1; } +#endif /* HAVE_SHMGET */ void shm_main_run(struct worker *worker) {