Skip to content

Commit

Permalink
Update port_def.inc
Browse files Browse the repository at this point in the history
Fix for Windows build with MinGW-w64 compiler which has __has_attribute but has issues with __attribute__((weak)).
  • Loading branch information
brechtsanders authored and acozzette committed Feb 12, 2021
1 parent 9a80cf1 commit 1e924ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/google/protobuf/port_def.inc
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@
#define PROTOBUF_PRAGMA_INIT_SEG
#endif

#if defined(__has_attribute)
#if defined(__has_attribute) && !defined(__MINGW32__)
#if __has_attribute(weak)
#define PROTOBUF_ATTRIBUTE_WEAK __attribute__((weak))
#endif
Expand Down

0 comments on commit 1e924ef

Please sign in to comment.