diff options
author | William Roberts <william.c.roberts@intel.com> | 2016-10-17 16:24:05 -0400 |
---|---|---|
committer | Stephen Smalley <sds@tycho.nsa.gov> | 2016-10-18 13:49:55 -0400 |
commit | 10199be9154f13b1187d9ac82945d9a2c4a864cf (patch) | |
tree | 734f49fb710b6ea94c54a071663b8e95aeb2cc56 /libselinux/src/label_internal.h | |
parent | 3340d851dfcb2c803fe470b116c5f1dff909308f (diff) | |
download | android_external_selinux-10199be9154f13b1187d9ac82945d9a2c4a864cf.tar.gz android_external_selinux-10199be9154f13b1187d9ac82945d9a2c4a864cf.tar.bz2 android_external_selinux-10199be9154f13b1187d9ac82945d9a2c4a864cf.zip |
libselinux: fix mac build warning when ANDROID_HOST=y
When building on Mac, outside of the Android tree, with ANDROID_HOST=y, this warning
is observed:
label.c:102:9: warning: implicit declaration of function 'fgets_unlocked' is invalid in C99 [-Wimplicit-function-declaration]
while (fgets_unlocked(buf, sizeof(buf) - 1, cfg)) {
Fix it by using the fgets_unlocked define that was introduced for Android, just apply it for mac builds
as well.
Signed-off-by: William Roberts <william.c.roberts@intel.com>
Diffstat (limited to 'libselinux/src/label_internal.h')
-rw-r--r-- | libselinux/src/label_internal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libselinux/src/label_internal.h b/libselinux/src/label_internal.h index 6a9481af..3d7ff748 100644 --- a/libselinux/src/label_internal.h +++ b/libselinux/src/label_internal.h @@ -16,8 +16,8 @@ #include "dso.h" #include "sha1.h" -#ifdef ANDROID -// Android does not have fgets_unlocked() +#if defined(ANDROID) || defined(__APPLE__) +// Android and Mac do not have fgets_unlocked() #define fgets_unlocked(buf, size, fp) fgets(buf, size, fp) #endif |