]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
compressor/zstd: include <zstd.h> instead of the bundled path 69188/head
authorSun Yuechi <sunyuechi@iscas.ac.cn>
Sun, 31 May 2026 09:04:09 +0000 (17:04 +0800)
committerSun Yuechi <sunyuechi@iscas.ac.cn>
Sun, 31 May 2026 09:41:34 +0000 (17:41 +0800)
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 <zstd.h>
so the include resolves through that interface either way.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
src/compressor/zstd/ZstdCompressor.h

index 954691e1b487bd37005ac103dd889484ee2a54a2..831cabbe7f108e86cd1777f07836234bb84c0f3e 100644 (file)
@@ -17,7 +17,7 @@
 #define CEPH_ZSTDCOMPRESSOR_H
 
 #define ZSTD_STATIC_LINKING_ONLY
-#include "zstd/lib/zstd.h"
+#include <zstd.h>
 
 #include "include/buffer.h"
 #include "include/encoding.h"