compress.c and inode.c use pthread functions but do not explicitly include <pthread.h>.
This causes build failures with the Android build system,
which throws "error: implicit declaration of function pthread_*".
Signed-off-by: Satoshi Niwa <niwa@google.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20241008060819.2442945-1-niwa@google.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
+#ifdef EROFS_MT_ENABLED
+#include <pthread.h>
+#endif
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
* with heavy changes by Gao Xiang <xiang@kernel.org>
*/
#define _GNU_SOURCE
+#ifdef EROFS_MT_ENABLED
+#include <pthread.h>
+#endif
#include <string.h>
#include <stdlib.h>
#include <stdio.h>