From: Satoshi Niwa Date: Tue, 8 Oct 2024 06:08:19 +0000 (+0900) Subject: erofs-utils: lib: Explicitly include where used X-Git-Tag: accepted/tizen/unified/20250610.081809~100 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f5bcf3cb912fb153ec41a4b7c2a01a0eba38269;p=platform%2Fupstream%2Ferofs-utils.git 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 --- 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