Merge pull request #19674 from veblush/unset-fortify

Reset _FORTIFY_SOURCE when GPR_BACKWARDS_COMPATIBILITY_MODE
pull/19699/head
Esun Kim 6 years ago committed by GitHub
commit 1194927905
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      include/grpc/impl/codegen/port_platform.h

@ -394,6 +394,18 @@
#endif
#endif /* GPR_NO_AUTODETECT_PLATFORM */
#if defined(GPR_BACKWARDS_COMPATIBILITY_MODE)
/*
* For backward compatibility mode, reset _FORTIFY_SOURCE to prevent
* a library from having non-standard symbols such as __asprintf_chk.
* This helps non-glibc systems such as alpine using musl to find symbols.
*/
#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
#undef _FORTIFY_SOURCE
#define _FORTIFY_SOURCE 0
#endif
#endif
/*
* There are platforms for which TLS should not be used even though the
* compiler makes it seem like it's supported (Android NDK < r12b for example).

Loading…
Cancel
Save