diff --git a/package/ghostscript/0001-Fix-compatibility-with-C23-compilers.patch b/package/ghostscript/0001-Fix-compatibility-with-C23-compilers.patch new file mode 100644 index 0000000000..0dfca9cfa2 --- /dev/null +++ b/package/ghostscript/0001-Fix-compatibility-with-C23-compilers.patch @@ -0,0 +1,36 @@ +From ae940946473ceb8c5353bc6e7f04673c6e60502d Mon Sep 17 00:00:00 2001 +From: Alex Cherepanov +Date: Thu, 3 Apr 2025 17:19:41 +0100 +Subject: Bug 708160: Fix compatibility with C23 compilers + +Upstream: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=ae940946473ceb8c5353bc6e7f04673c6e60502d +[thomas: Only backport the bool typedef condition] +Signed-off-by: Thomas Perale +--- + base/stdpre.h | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/base/stdpre.h b/base/stdpre.h +index dda30b6a4..2f9c84e0d 100644 +--- a/base/stdpre.h ++++ b/base/stdpre.h +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2001-2023 Artifex Software, Inc. ++/* Copyright (C) 2001-2025 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or +@@ -341,7 +341,9 @@ typedef signed char schar; + * and the MetroWerks C++ compiler insists that bool be equivalent to + * unsigned char. + */ +-#ifndef __cplusplus ++ ++/* C23 has bool as a builtin type. */ ++#if !defined(__cplusplus) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L) + #ifdef __BEOS__ + typedef unsigned char bool; + #else +-- +cgit v1.2.3 +