From d20b9ff3ee0f1014a740baed908dc0a08c646fb6 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 2 Nov 2015 08:32:21 -0600 Subject: Don't pass target $CFLAGS to host builds (telling x86 compiler to be big-endian seldom ends well). Instead add -DBUILD_FOR_HOST to $HOSTCC and wrap #ifdefs around problematic (smack) includes from toys.h. --- lib/lsm.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/lsm.h b/lib/lsm.h index d7e7de9c..aacabe08 100644 --- a/lib/lsm.h +++ b/lib/lsm.h @@ -3,6 +3,8 @@ * Copyright 2015 Rob Landley */ +#ifndef BUILD_FOR_HOST + #if CFG_TOYBOX_SELINUX #include #else @@ -113,3 +115,5 @@ static inline int lsm_fget_context(int file, char **context) return smack_new_label_from_file(file, XATTR_NAME_SMACK, context); return fgetfilecon(file, context); } + +#endif // BUILD_FOR_HOST -- cgit v1.2.3