ports/devel/simgear/files/patch-simgear-structure-SGAtomic.hxx
Ganael LAPLANCHE 9cc6248ca1 games/flightgear: Update to 2024.1.1
Also:
- Switch upstream to Gitlab for code + download.flightgear.org for data
- Switch to c++17

PR:	287776 287777 287778
Reported by:	Stefan Rumetshofer <sterum77@gmail.com>
2025-07-01 12:09:23 +02:00

18 lines
705 B
C++

Work around:
SGAtomic.cxx:48:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
to fix build on i386 as Simgear uses CMAKE_CXX_STANDARD=17
--- simgear/structure/SGAtomic.hxx.orig 2025-06-30 15:01:54 UTC
+++ simgear/structure/SGAtomic.hxx
@@ -25,7 +25,7 @@
defined(__x86_64__)
// No need to include something. Is a Compiler API ...
# define SGATOMIC_USE_GCC4_BUILTINS
-#elif defined(__GNUC__) && defined(__i386__)
+#elif (__cplusplus < 201703L) && defined(__GNUC__) && defined(__i386__)
# define SGATOMIC_USE_LIBRARY_FUNCTIONS
#elif defined(__sgi) && defined(_COMPILER_VERSION) && (_COMPILER_VERSION>=730)
// No need to include something. Is a Compiler API ...