File 0002-QTV-fix-compilation-with-C23.patch of Package fteqw

From ff03f183b7ff559db0f61a8607a0e0557f36e728 Mon Sep 17 00:00:00 2001
From: erysdren <contact@erysdren.me>
Date: Fri, 23 May 2025 07:22:03 -0500
Subject: [PATCH 2/6] QTV: fix compilation with C23

---
 fteqtv/qtv.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/fteqtv/qtv.h b/fteqtv/qtv.h
index 7f63c76e0..0bd6aac94 100644
--- a/fteqtv/qtv.h
+++ b/fteqtv/qtv.h
@@ -296,12 +296,13 @@ size_t CalcHMAC(hashfunc_t *hashfunc, unsigned char *digest, size_t maxdigestsiz
 #include "protocol.h"
 
 
-
-
-#ifndef __cplusplus
+#if !defined(__cplusplus) && (!defined(__STDC_VERSION__) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ < 202311L)))
 typedef enum {false, true} qboolean;
 #else
 typedef int qboolean;
+#endif
+
+#ifdef __cplusplus
 extern "C" {
 #endif
 
-- 
2.51.1

openSUSE Build Service is sponsored by