From c20bdf81683558555d893e3e46cd035218f65d3b Mon Sep 17 00:00:00 2001 From: Sun Yuechi Date: Sun, 31 May 2026 17:04:09 +0800 Subject: [PATCH] compressor/zstd: include instead of the bundled path ZstdCompressor.h hard-codes #include "zstd/lib/zstd.h", which only resolves because include_directories(src) puts the bundled submodule on the search path. It thus silently depends on src/zstd being checked out, and breaks with -DWITH_SYSTEM_ZSTD=ON where the submodule is absent. ceph_zstd already links Zstd::Zstd, whose INTERFACE_INCLUDE_DIRECTORIES points at the directory holding zstd.h in both modes: src/zstd/lib for the bundled build, ${Zstd_INCLUDE_DIR} for the system one. Use so the include resolves through that interface either way. Signed-off-by: Sun Yuechi --- src/compressor/zstd/ZstdCompressor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compressor/zstd/ZstdCompressor.h b/src/compressor/zstd/ZstdCompressor.h index 954691e1b48..831cabbe7f1 100644 --- a/src/compressor/zstd/ZstdCompressor.h +++ b/src/compressor/zstd/ZstdCompressor.h @@ -17,7 +17,7 @@ #define CEPH_ZSTDCOMPRESSOR_H #define ZSTD_STATIC_LINKING_ONLY -#include "zstd/lib/zstd.h" +#include #include "include/buffer.h" #include "include/encoding.h" -- 2.47.3