[contrib][linux] Fix -Wundef inside Linux kernel tree

Commit d7ef97a013
("[build] Fix oss-fuzz build with the dataflow sanitizer") broke
build inside Linux-kernel after 'import', as it no longer can
conditionally remove ZSTD_MEMORY_SANITIZER definition from
the #if DEF_A || DEF_B block. This emits -Wundef warning which
can be treated as error.
Split this preprocessor condition into two separate conditions
to fix this.

Fixes: d7ef97a013 ("[build] Fix oss-fuzz build with the dataflow sanitizer")
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
This commit is contained in:
Alexander Lobakin
2021-09-25 13:35:25 +02:00
parent 32a8443b5c
commit 71526e6f29
+4 -2
View File
@@ -47,11 +47,13 @@
* Disable when MSAN is enabled. * Disable when MSAN is enabled.
*/ */
#if defined(__linux__) || defined(__linux) || defined(__APPLE__) #if defined(__linux__) || defined(__linux) || defined(__APPLE__)
# if ZSTD_MEMORY_SANITIZER || ZSTD_DATAFLOW_SANITIZER # if ZSTD_MEMORY_SANITIZER
# define HUF_ASM_SUPPORTED 0
# elif ZSTD_DATAFLOW_SANITIZER
# define HUF_ASM_SUPPORTED 0 # define HUF_ASM_SUPPORTED 0
# else # else
# define HUF_ASM_SUPPORTED 1 # define HUF_ASM_SUPPORTED 1
#endif # endif
#else #else
# define HUF_ASM_SUPPORTED 0 # define HUF_ASM_SUPPORTED 0
#endif #endif