diff options
author | Colin Cross <ccross@android.com> | 2021-09-15 00:22:59 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-09-15 00:22:59 +0000 |
commit | 385c784133aba6d2ed343dd85f830eee5319f116 (patch) | |
tree | 974029addcb28418bebf867918d8b014de3868e3 | |
parent | 7c86b485f3a20cd65c7bca1941736d5418eb8969 (diff) | |
parent | f6c546a5ccbedfb77dd90869031985b9aec6991c (diff) | |
download | newfs_msdos-385c784133aba6d2ed343dd85f830eee5319f116.tar.gz |
Treat musl like glibc am: dd90b872c8 am: 6fe1106138 am: f6c546a5ccandroid-t-preview-2android-t-preview-1android-t-beta-3android-s-v2-beta-3android-s-qpr3-beta-1android-t-preview-1android-s-v2-beta-3android-s-qpr3-beta-1
Original change: https://android-review.googlesource.com/c/platform/external/newfs_msdos/+/1826852
Change-Id: I6c066c44a030ad66f38a4a6561b0f0c2c6457ce2
-rw-r--r-- | freebsd-compat.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/freebsd-compat.h b/freebsd-compat.h index 1fdbafe..7ab9d70 100644 --- a/freebsd-compat.h +++ b/freebsd-compat.h @@ -20,17 +20,17 @@ #if __has_include(<sys/sysctl.h>) #include <sys/sysctl.h> #endif -// Bionic, like the BSDs, has __unused. glibc doesn't. -#if defined(__GLIBC__) +// Bionic, like the BSDs, has __unused. glibc and musl don't. +#if defined(__GLIBC__) || defined(ANDROID_HOST_MUSL) #define __unused __attribute__((__unused__)) #endif -// Neither macOS nor glibc has __packed. -#if defined(__APPLE__) || defined(__GLIBC__) +// Neither macOS, glibc nor musl has __packed. +#if defined(__APPLE__) || defined(__GLIBC__) || defined(ANDROID_HOST_MUSL) #define __packed __attribute__((__packed__)) #endif -// The BSDs (including Android and macOS) have getprogname(), but glibc doesn't. -#if defined(__GLIBC__) +// The BSDs (including Android and macOS) have getprogname(), but glibc and musl don't. +#if defined(__GLIBC__) || defined(ANDROID_HOST_MUSL) #include <errno.h> static inline char* getprogname() { return program_invocation_short_name; } #endif |