]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix to compile the shm code when there is no shmget.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 17 Apr 2026 07:42:35 +0000 (09:42 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 17 Apr 2026 07:42:35 +0000 (09:42 +0200)
doc/Changelog
util/shm_side/shm_main.c

index 478a549cd2fb974eca6e077df287e1e4fa44f6ce..af03f1b818bed7ca88c01b79fed8483480c634f9 100644 (file)
@@ -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.
index 420adbbdaf91cad07e256a9b949dc67c8cac2c36..ec0231b121b76fed58da9a232137f46481aee6b3 100644 (file)
@@ -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)
 {