Skip to content

Commit 1e924ef

Browse files
brechtsandersacozzette
authored andcommitted
Update port_def.inc
Fix for Windows build with MinGW-w64 compiler which has __has_attribute but has issues with __attribute__((weak)).
1 parent 9a80cf1 commit 1e924ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/google/protobuf/port_def.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@
615615
#define PROTOBUF_PRAGMA_INIT_SEG
616616
#endif
617617

618-
#if defined(__has_attribute)
618+
#if defined(__has_attribute) && !defined(__MINGW32__)
619619
#if __has_attribute(weak)
620620
#define PROTOBUF_ATTRIBUTE_WEAK __attribute__((weak))
621621
#endif

0 commit comments

Comments
 (0)