Skip to content

Commit b02b597

Browse files
andrewjcgfacebook-github-bot
authored andcommitted
Fix compiler bug/error on gcc-11
Summary: As per comment, fix a compile error due to bad macro defn in gcc intrinsic headers. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100438 Reviewed By: vitaut Differential Revision: D63900126 fbshipit-source-id: a74de56843a27f9d210c653f5739065ad629ab34
1 parent cbdc875 commit b02b597

File tree

1 file changed

+9
-0
lines changed
  • third-party/thrift/src/thrift/lib/python

1 file changed

+9
-0
lines changed

third-party/thrift/src/thrift/lib/python/types.pxd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ from libcpp.memory cimport unique_ptr
2020

2121
from thrift.python.protocol cimport Protocol
2222

23+
# gcc's `serializeintrin.h` header defines a macro named `_serialize`, which
24+
# clobbers the `_serialize` method on IOBufs. This should be fixed in more
25+
# recent versions, but add this to avoid compile errors on older ones
26+
# (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100438).
27+
cdef extern from *:
28+
"""
29+
#undef _serialize
30+
"""
31+
2332
cdef extern from "<thrift/lib/cpp/protocol/TType.h>" namespace "::apache::thrift::protocol":
2433
cdef enum cTType "::apache::thrift::protocol::TType":
2534
pass

0 commit comments

Comments
 (0)