mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-16 06:07:00 +02:00
gimp: fix configure for c99 and gcc14
This commit is contained in:
parent
87a0225454
commit
0ad86a6af0
1 changed files with 63 additions and 0 deletions
63
srcpkgs/gimp/patches/gcc14.patch
Normal file
63
srcpkgs/gimp/patches/gcc14.patch
Normal file
|
@ -0,0 +1,63 @@
|
|||
From 99531e73e95bf6de4aed9bf64ac3f306e6dfb490 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Fri, 13 Jan 2023 13:29:07 +0100
|
||||
Subject: [PATCH] configure.ac: Improve C99 compatibility of IPC_RMID check
|
||||
|
||||
Do not call the undeclared exit function. Implicit function
|
||||
declarations are likely not going to be supported by future compilers
|
||||
by default, changing the outcome of this configure probe with
|
||||
such compilers.
|
||||
---
|
||||
configure.ac | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 03047899841..b8718955471 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1254,17 +1254,17 @@ elif test "x$shmtype" = "xsysv"; then
|
||||
char *shmaddr;
|
||||
id = shmget (IPC_PRIVATE, 4, IPC_CREAT | 0600);
|
||||
if (id == -1)
|
||||
- exit (2);
|
||||
+ return 2;
|
||||
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;
|
||||
}
|
||||
]])],
|
||||
[AC_DEFINE([IPC_RMID_DEFERRED_RELEASE],[1],
|
||||
diff --git a/configure b/configure
|
||||
index 6e62da8e3c164f82..f1c447baf7ff68f7 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -28898,17 +28898,17 @@ else $as_nop
|
||||
char *shmaddr;
|
||||
id = shmget (IPC_PRIVATE, 4, IPC_CREAT | 0600);
|
||||
if (id == -1)
|
||||
- exit (2);
|
||||
+ return 2;
|
||||
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;
|
||||
}
|
||||
|
||||
_ACEOF
|
Loading…
Add table
Reference in a new issue