Closed UnitedMarsupials-zz closed 7 years ago
gcc does not recognize the attribute __unused Also, pam_ext.h is needed for pam_get_authtok
gcc does not recognize the attribute __unused
Indeed, it is a FreeBSD short-cut for __attribute__((unused))
. Try:
#ifndef __unused
# ifdef __GNUC__
# define __unused __attribute__((__unused__))
# else
# define __unused
# endif
#endif
Also, pam_ext.h is needed for pam_get_authtok
Khmm, FreeBSD uses OpenPAM, which declares the function in <security/openpam.h>
-- there is no pam_ext.h
here. It may need another compatibility-ifdef... I'll research it.
The current version of my fork should compile cleanly for both of us...
Works great! Thank you very much for your contribution! But please follow my indentation style (4 spaces in place of tabs).
But please follow my indentation style (4 spaces in place of tabs).
I thought, I do (painful though it is)...
Add const-attribute to the input parameters of various functions.
Declare the internal functions as static, remove unused variables. No functional changes, but these steps allow pam_duress.c to compile on FreeBSD with clang and WARNS=5 level of compiler-warnings.