Skip to content

Commit f15a46f

Browse files
committed
- Fix to compile the shm code when there is no shmget.
1 parent 8d434bf commit f15a46f

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

doc/Changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from a clang analyzer warning.
44
- Fix setup of ssl context copy, to check for the tls service
55
pem option for stat calls.
6+
- Fix to compile the shm code when there is no shmget.
67

78
16 April 2026: Yorgos
89
- Merge #1406: Introduce new 'tls-protocols' configuration option.

util/shm_side/shm_main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ void shm_main_shutdown(struct daemon* daemon)
234234
#endif /* HAVE_SHMGET */
235235
}
236236

237+
#ifdef HAVE_SHMGET
237238
/** Copy general info into the stat structure. */
238239
static void
239240
shm_general_info(struct worker* worker)
@@ -284,7 +285,9 @@ shm_general_info(struct worker* worker)
284285
shm_stat->mem.dynlib = (long long)mod_get_mem(&worker->env, "dynlib");
285286
#endif
286287
}
288+
#endif /* HAVE_SHMGET */
287289

290+
#ifdef HAVE_SHMGET
288291
/** See if the thread is first. Caller has lock. */
289292
static int
290293
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,
321324
}
322325
return 0;
323326
}
327+
#endif /* HAVE_SHMGET */
324328

329+
#ifdef HAVE_SHMGET
325330
/** See if the thread is last. Caller has lock. */
326331
static int
327332
shm_thread_is_last(struct daemon* daemon)
@@ -336,6 +341,7 @@ shm_thread_is_last(struct daemon* daemon)
336341
}
337342
return 1;
338343
}
344+
#endif /* HAVE_SHMGET */
339345

340346
void shm_main_run(struct worker *worker)
341347
{

0 commit comments

Comments
 (0)