Fix compile error on darwin GCC due to an unsupported attribute init_priority (#8600)

pull/8615/head
Twice 4 years ago committed by GitHub
parent 7bbfd14b7f
commit 9344e0b724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/google/protobuf/port_def.inc

@ -506,7 +506,7 @@
#ifdef PROTOBUF_ATTRIBUTE_INIT_PRIORITY
#error PROTOBUF_ATTRIBUTE_INIT_PRIORITY was previously defined
#endif
#if PROTOBUF_GNUC_MIN(3, 0)
#if PROTOBUF_GNUC_MIN(3, 0) && (!defined(__APPLE__) || defined(__clang__))
#define PROTOBUF_ATTRIBUTE_INIT_PRIORITY __attribute__((init_priority((102))))
#else
#define PROTOBUF_ATTRIBUTE_INIT_PRIORITY

Loading…
Cancel
Save