]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3726] Protected PROTOCOL_VERSION in Botan wrapper
authorFrancis Dupont <fdupont@isc.org>
Sat, 25 Jan 2025 14:39:21 +0000 (15:39 +0100)
committerFrancis Dupont <fdupont@isc.org>
Fri, 31 Jan 2025 17:49:47 +0000 (18:49 +0100)
src/lib/asiolink/botan_wrapper.h

index 09d14838de572dab0eda3c6e86f8998eabd392a3..1fa24212025107155899b20197da12652d6df8fa 100644 (file)
 #pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
 #endif
 
+/// MariaDB defines PROTOCOL_VERSION which is also in a Botan enum...
+
+#ifdef PROTOCOL_VERSION
+#define BOTAN_BACKUP_FOR_PROTOCOL_VERSION PROTOCOL_VERSION
+#undef PROTOCOL_VERSION
+#endif
+
 #include <botan/asio_error.h>
 
+#ifdef BOTAN_BACKUP_FOR_PROTOCOL_VERSION
+#define PROTOCOL_VERSION BOTAN_BACKUP_FOR_PROTOCOL_VERSION
+#undef BOTAN_BACKUP_FOR_PROTOCOL_VERSION
+#endif
+
 #if defined(__GNUC__) || defined(__clang__)
 #pragma GCC diagnostic pop
 #endif