diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-09 20:34:33 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-09 20:34:33 +0000 |
commit | 36fc2375ad20f85f8f4a8c8f8a9e7c6595b80780 (patch) | |
tree | 974029addcb28418bebf867918d8b014de3868e3 | |
parent | 5d3caa0d33822bd338c17b1f1e091e3e79137ceb (diff) | |
parent | 3b9ae9a9990a08aad84b3bfd951d4cc328b4ba75 (diff) | |
download | newfs_msdos-36fc2375ad20f85f8f4a8c8f8a9e7c6595b80780.tar.gz |
Snap for 8562061 from 3b9ae9a9990a08aad84b3bfd951d4cc328b4ba75 to mainline-media-releaseaml_med_331911000aml_med_331712010aml_med_331612000aml_med_331511000aml_med_331410000aml_med_331318000aml_med_331115000aml_med_331012020android13-mainline-media-release
Change-Id: Idedd838a8550fd8b1b80f0bcf6605d42d3a43f45
-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 |