File: flatbuffers.patch

package info (click to toggle)
onnxruntime 1.21.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 333,732 kB
  • sloc: cpp: 3,153,079; python: 179,219; ansic: 109,131; asm: 37,791; cs: 34,424; perl: 13,070; java: 11,047; javascript: 6,330; pascal: 4,126; sh: 3,277; xml: 598; objc: 281; makefile: 59
file content (30 lines) | stat: -rw-r--r-- 1,190 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3987eac9..5e5462f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -279,5 +279,5 @@
 # Append FLATBUFFERS_CXX_FLAGS to CMAKE_CXX_FLAGS.
 if(DEFINED FLATBUFFERS_CXX_FLAGS)
   message(STATUS "extend CXX_FLAGS with ${FLATBUFFERS_CXX_FLAGS}")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLATBUFFERS_CXX_FLAGS}")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLATBUFFERS_CXX_FLAGS} -Wno-error=stringop-overflow")
 endif()
 message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h
index bc828a31..3d3effe8 100644
--- a/include/flatbuffers/flatbuffers.h
+++ b/include/flatbuffers/flatbuffers.h
@@ -213,7 +213,12 @@ inline const char * const *ElementaryTypeNames() {
 // We're explicitly defining the signedness since the signedness of integer
 // bitfields is otherwise implementation-defined and causes warnings on older
 // GCC compilers.
-struct TypeCode {
+
+struct
+#if defined(_AIX) && defined(__clang__)
+__attribute__((packed))
+#endif
+TypeCode {
   // ElementaryType
   unsigned short base_type : 4;
   // Either vector (in table) or array (in struct)