From: Sun Yuechi Date: Sun, 31 May 2026 09:04:09 +0000 (+0800) Subject: compressor/zstd: include instead of the bundled path X-Git-Tag: v21.0.1~33^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c20bdf81683558555d893e3e46cd035218f65d3b;p=ceph.git 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 --- 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"