Skip to content

Commit b4eb89b

Browse files
committed
[#3726] Protected PROTOCOL_VERSION in Botan wrapper
1 parent ce219fb commit b4eb89b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/lib/asiolink/botan_wrapper.h

+12
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,20 @@
2121
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
2222
#endif
2323

24+
/// MariaDB defines PROTOCOL_VERSION which is also in a Botan enum...
25+
26+
#ifdef PROTOCOL_VERSION
27+
#define BOTAN_BACKUP_FOR_PROTOCOL_VERSION PROTOCOL_VERSION
28+
#undef PROTOCOL_VERSION
29+
#endif
30+
2431
#include <botan/asio_error.h>
2532

33+
#ifdef BOTAN_BACKUP_FOR_PROTOCOL_VERSION
34+
#define PROTOCOL_VERSION BOTAN_BACKUP_FOR_PROTOCOL_VERSION
35+
#undef BOTAN_BACKUP_FOR_PROTOCOL_VERSION
36+
#endif
37+
2638
#if defined(__GNUC__) || defined(__clang__)
2739
#pragma GCC diagnostic pop
2840
#endif

0 commit comments

Comments
 (0)