From decdb2ba3f0d3a3f89d162a958266cd38a4231ae Mon Sep 17 00:00:00 2001 From: Jehan Date: Mon, 23 Jan 2023 18:13:18 +0100 Subject: [PATCH] meson: Improve C99 compatibility of IPC_RMID check. See previous commit and !810. Porting the autotools fix we made there to the meson build too. --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index b163d75656..e653a6e4e9 100644 --- a/meson.build +++ b/meson.build @@ -1355,17 +1355,17 @@ if shmem_choice == 'sysv' int main() { int id = shmget(IPC_PRIVATE, 4, IPC_CREAT | 0600); if (id == -1) - exit(2); + return 2; char *shmaddr = shmat(id, 0, 0); shmctl(id, IPC_RMID, 0); if ((char*) shmat(id, 0, 0) == (char*) -1) { shmdt(shmaddr); - exit(1); + return 1; } shmdt(shmaddr); shmdt(shmaddr); - exit(0); + return 0; } ''').returncode() == 0 conf.set('IPC_RMID_DEFERRED_RELEASE', check_ip_rmid_deferred_release)