From 9f5bcf3cb912fb153ec41a4b7c2a01a0eba38269 Mon Sep 17 00:00:00 2001 From: Satoshi Niwa Date: Tue, 8 Oct 2024 15:08:19 +0900 Subject: [PATCH] erofs-utils: lib: Explicitly include where used compress.c and inode.c use pthread functions but do not explicitly include . This causes build failures with the Android build system, which throws "error: implicit declaration of function pthread_*". Signed-off-by: Satoshi Niwa Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20241008060819.2442945-1-niwa@google.com Signed-off-by: Gao Xiang --- lib/compress.c | 3 +++ lib/inode.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/compress.c b/lib/compress.c index 17e7112..5d6fb2a 100644 --- a/lib/compress.c +++ b/lib/compress.c @@ -8,6 +8,9 @@ #ifndef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE #endif +#ifdef EROFS_MT_ENABLED +#include +#endif #include #include #include diff --git a/lib/inode.c b/lib/inode.c index 7958d43..48f46b1 100644 --- a/lib/inode.c +++ b/lib/inode.c @@ -6,6 +6,9 @@ * with heavy changes by Gao Xiang */ #define _GNU_SOURCE +#ifdef EROFS_MT_ENABLED +#include +#endif #include #include #include -- 2.34.1