Commit c4598ce3 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-6862 "#error <my_config.h>" and third-party libraries

only enforce the include order if SAFE_MUTEX is defined
(that is, in MariaDB source builds in debug mode)
parent 360c49c1
......@@ -648,9 +648,13 @@
included first (or at least before <features.h> - so, practically,
before including any system headers).
__GLIBC__ is defined in <features.h>
Check the include order by looking at __GLIBC__ (defined in <features.h>)
But we cannot force all third-party clients/connectors to include
my_config.h first. So, their crashes are their responsibility,
we enable this check only for MariaDB sources (SAFE_MUTEX check).
*/
#ifdef __GLIBC__
#if defined(__GLIBC__) && defined(SAFE_MUTEX)
#error <my_config.h> MUST be included first!
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment