SHA256
1
0
forked from pool/protobuf
protobuf/gcc12-disable-__constinit-with-c++-11.patch
Martin Pluskal 10972090a8 Accepting request 1084558 from system:homeautomation:home-assistant:unstable
- update to v22.3
- python sub packages version is set 4.22.3 as defined in
  python/google/protobuf/__init__.py to stay compatible
- skip python2 builds by default
- 10355.patch    got merged upstream
- add-missing-stdint-header.patch   added for compile fixes

OBS-URL: https://build.opensuse.org/request/show/1084558
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/protobuf?expand=0&rev=146
2023-05-04 08:11:13 +00:00

18 lines
656 B
Diff

Index: protobuf-22.3/src/google/protobuf/port_def.inc
===================================================================
--- protobuf-22.3.orig/src/google/protobuf/port_def.inc
+++ protobuf-22.3/src/google/protobuf/port_def.inc
@@ -708,7 +708,11 @@ static_assert(PROTOBUF_CPLUSPLUS_MIN(201
# define PROTOBUF_CONSTINIT [[clang::require_constant_initialization]]
# define PROTOBUF_CONSTEXPR constexpr
# elif PROTOBUF_GNUC_MIN(12, 2)
-# define PROTOBUF_CONSTINIT __constinit
+#if PROTOBUF_CPLUSPLUS_MIN(201703L)
+#define PROTOBUF_CONSTINIT __constinit
+#else
+#define PROTOBUF_CONSTINIT
+#endif
# define PROTOBUF_CONSTEXPR constexpr
# endif
#endif