The declaration of fstat was missing. "gcc -Wall" reported:
libqpol/policy.c: In function 'qpol_policy_open_from_file_opt':
libqpol/policy.c:1060:3: warning: implicit declaration of function
'fstat' [-Wimplicit-function-declaration]
if (fstat(fd, &sb) < 0) {
^
"gcc -Wformat" needs printing functions to be marked with a format
attribute to be able to work. Add this attribute to some functions in
libqpol, found with "gcc -Werror=missing-format-attribute"
gcc documentation about format attribute:
https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html