mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-12 00:19:24 +00:00
b13c44c367
Compilation tools respects certain environment variables, like CC. However, in libselinux and libsemanage, they are not respected everywhere. This command fixes respect for those variables, falling back to the previous hardcoded values if not specified.
21 lines
404 B
Bash
Executable File
21 lines
404 B
Bash
Executable File
function except() {
|
|
case $1 in
|
|
selinux_file_context_cmp) # ignore
|
|
;;
|
|
*)
|
|
echo "
|
|
%exception $1 {
|
|
\$action
|
|
if (result < 0) {
|
|
PyErr_SetFromErrno(PyExc_OSError);
|
|
return NULL;
|
|
}
|
|
}
|
|
"
|
|
;;
|
|
esac
|
|
}
|
|
${CC:-gcc} -x c -c -I../include - -aux-info temp.aux < ../include/selinux/selinux.h
|
|
for i in `awk '/<stdin>.*extern int/ { print $6 }' temp.aux`; do except $i ; done
|
|
rm -f -- temp.aux -.o
|