File: gcc-15.patch

package info (click to toggle)
mpsolve 3.2.1-11
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 13,196 kB
  • sloc: ansic: 24,344; sh: 4,701; cpp: 3,138; makefile: 906; python: 407; yacc: 158; lex: 85; xml: 41
file content (18 lines) | stat: -rw-r--r-- 522 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Don't define mps_boolean as enum in C23 (true/false are keywords)
 Fixes build in GCC-15, where C23 is the default.
Bug-Debian: https:/bugs.debian.org/1097416
Author: Doug Torrance <dtorrance@debian.org>
Forwarded: https://github.com/robol/MPSolve/pull/44
Last-Update: 2025-02-18

--- a/include/mps/mps.h
+++ b/include/mps/mps.h
@@ -25,7 +25,7 @@
 #ifndef MPS_CORE_H_
 #define MPS_CORE_H_
 
-#ifdef __cplusplus
+#if defined(__cplusplus) || __STDC_VERSION__ >= 202311L
 #define __MPS_NOT_DEFINE_BOOL
 #endif