Hello,
I want to use SELinux for my experimental vanilla kernel distribution in Pandaboard ES. To achieve that I have configured my kernel for SELinux support. Then, I have recently cloned selinux userspace repository to cross-compile it for arm architecture. I use arm-linux-gnueabi toolchain in Ubuntu 14.04 workstation.
$ export ARCH=arm
$ export CROSS_COMPILE=arm-linux-gnueabi-
As mentioned in readme instruction,
$ make DESTDIR=~/obj install install-pywrap
command is used, however due to -Werror flags in various Makefile's, error is thrown:
dispol.c: In function ‘main’:
dispol.c:452:8: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
fgets(ans, sizeof(ans), stdin);
^
dispol.c:479:9: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
fgets(ans, sizeof(ans), stdin);
^
dispol.c:490:9: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
fgets(ans, sizeof(ans), stdin);
^
dispol.c:517:9: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
fgets(OutfileName, sizeof(OutfileName), stdin);
^
cc1: all warnings being treated as errors
make[2]: *** [dispol.o] Error 1
I did this modification to get over this error which is caused by -Werror flag:
char *fgetsret; /* error is given, because return value is not captured */
fgetsret = fgets(...);
if (!fgetsret) { /* if fgetsret is not used, another error comes from warning */
// some exit message
exit(1);
}
Did I miss something about SELinux cross-compilation for an arm architecture, since constantly I'm taking errors.
-- Emre Can Kucukoglu
_______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.