kravietz / pam_tacplus

TACACS+ protocol client library and PAM module in C. This PAM module support authentication, authorization (account management) and accounting (session management)performed using TACACS+ protocol designed by Cisco.
GNU Lesser General Public License v3.0
132 stars 100 forks source link

Fix getrandom call in magic.c #118

Closed ffontaine closed 5 years ago

ffontaine commented 6 years ago

_GNU_SOURCE must be defined before any includes to be able to use getrandom

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

pprindeville commented 5 years ago

Too late now but I would have added that to the CFLAGS in the Makefile instead...

pprindeville commented 5 years ago

Wish I had noticed it earlier. Must have been in a coma.

kravietz commented 5 years ago

@pprindeville just saw this one and though it's worth adding as I'm myself getting a warning on getrandom and I will add another fix tomorrow, so I can also move it to CFLAGS.

kravietz commented 5 years ago

In 7e990f9 I have resolved it by using AC_USE_SYSTEM_EXTENSIONS which seems to be the most portable way to set _GNU_SOURCE, can you please test it?