diff options
author | Colin Cross <ccross@android.com> | 2021-08-16 17:17:03 -0700 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-09-13 10:37:11 -0400 |
commit | 1950b65452198630b55703f6f14c0d554a7f05fe (patch) | |
tree | 449c159709a00ee903bc2100bade8413e52aa7b1 /contrib | |
parent | 9892631d0426ac07aceb1939cf0430481461dd63 (diff) | |
download | e2fsprogs-1950b65452198630b55703f6f14c0d554a7f05fe.tar.gz |
AOSP: Fix e2fsdroid build with musl
The e2fsdroid build fails with musl because config.h is not included
before ext2fs.h, which causes HAVE_SYS_TYPES_H not to be defined
resulting in a missing definition for dev_t.
Include config.h at the top of each .c file, and remove extra
config.h include from perms.h.
Bug: 190084016
Test: m USE_HOST_MUSL=true fastboot
Change-Id: I95b3fff3f10ba85c00ec049811dd6b5d412e5dd2
From AOSP commit: 09c63d5edd35e3ca8366be0d92aad922d8895ac1
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/android/e2fsdroid.c | 2 | ||||
-rw-r--r-- | contrib/android/perms.c | 1 | ||||
-rw-r--r-- | contrib/android/perms.h | 1 |
3 files changed, 2 insertions, 2 deletions
diff --git a/contrib/android/e2fsdroid.c b/contrib/android/e2fsdroid.c index f5d24b88..6e514140 100644 --- a/contrib/android/e2fsdroid.c +++ b/contrib/android/e2fsdroid.c @@ -1,11 +1,11 @@ #define _GNU_SOURCE +#include "config.h" #include <stdio.h> #include <getopt.h> #include <string.h> #include <unistd.h> #include <limits.h> -#include <ext2fs/ext2fs.h> #include "perms.h" #include "base_fs.h" diff --git a/contrib/android/perms.c b/contrib/android/perms.c index 9c5ec05b..dd05644e 100644 --- a/contrib/android/perms.c +++ b/contrib/android/perms.c @@ -1,6 +1,7 @@ #ifndef _GNU_SOURCE # define _GNU_SOURCE //asprintf #endif +#include "config.h" #include "perms.h" #include "support/nls-enable.h" #include <time.h> diff --git a/contrib/android/perms.h b/contrib/android/perms.h index 79871272..9ea3f95c 100644 --- a/contrib/android/perms.h +++ b/contrib/android/perms.h @@ -1,7 +1,6 @@ #ifndef ANDROID_PERMS_H # define ANDROID_PERMS_H -# include "config.h" # include <ext2fs/ext2fs.h> typedef void (*fs_config_f)(const char *path, int dir, |