Bump version to 24.04.3.4
[LibreOffice.git] / external / argon2 / 0001-Fix-possible-compiler-error-due-to-undefined-_MSC_VE.patch
blob538b41e3ec9febb1dbc7542f90cbdde6de9eea9c
1 From 48829f87ebafbb9938d23a8f0bff4d11d770690e Mon Sep 17 00:00:00 2001
2 From: Patrick Steinhardt <ps@pks.im>
3 Date: Thu, 20 Feb 2020 17:37:32 +0100
4 Subject: [PATCH] Fix possible compiler error due to undefined _MSC_VER
6 In order to determine how to set up the ARGON2_PUBLIC and ARGON2_LOCAL
7 macros, we check for various different environments via preprocessor
8 defines. For Microsoft Visual Studio, we check that the macro _MSC_VER
9 evaluates to non-zero via `#elif _MSC_VER`. This may raise a compile
10 error when compiling with "-Werror=undef" if the variable isn't defined.
12 Fix the issue by using `#elif defined(_MSC_VER)` instead.
13 ---
14 include/argon2.h | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
17 diff --git a/include/argon2.h b/include/argon2.h
18 index fc8682c..1b471f6 100644
19 --- a/include/argon2.h
20 +++ b/include/argon2.h
21 @@ -30,7 +30,7 @@ extern "C" {
22 #ifdef A2_VISCTL
23 #define ARGON2_PUBLIC __attribute__((visibility("default")))
24 #define ARGON2_LOCAL __attribute__ ((visibility ("hidden")))
25 -#elif _MSC_VER
26 +#elif defined(_MSC_VER)
27 #define ARGON2_PUBLIC __declspec(dllexport)
28 #define ARGON2_LOCAL
29 #else
30 --
31 2.43.0