summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuel Varley <samuel.varley@alliedtelesis.co.nz>2015-11-24 16:25:13 +1300
committerSamuel Varley <samuel.varley@alliedtelesis.co.nz>2015-11-24 16:33:35 +1300
commit22f8cc4e6c149ceb272ecad2caea9f33ec86dfaa (patch)
tree3e5c2630c2b35a66ffa257d3d7d6c1c52fb4b3b7 /src
parent6bae92df885602b2558333bdb6d2db67d1365683 (diff)
downloadlibpam-radius-auth-22f8cc4e6c149ceb272ecad2caea9f33ec86dfaa.tar.gz
libpam-radius-auth-22f8cc4e6c149ceb272ecad2caea9f33ec86dfaa.zip
Ensure config.h is included first.
pam_radius_auth.c was including config.h via pam_radius_auth.h but only after other library header files had been included. This meant you could have _GNU_SOURCE, for example, defined in config.h but it did not have any effect on which library functions were provided.
Diffstat (limited to 'src')
-rw-r--r--src/pam_radius_auth.c4
-rw-r--r--src/pam_radius_auth.h3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/pam_radius_auth.c b/src/pam_radius_auth.c
index 90d074a..d184e1a 100644
--- a/src/pam_radius_auth.c
+++ b/src/pam_radius_auth.c
@@ -55,10 +55,6 @@
#define PAM_SM_PASSWORD
#define PAM_SM_SESSION
-#include <limits.h>
-#include <errno.h>
-#include <sys/time.h>
-
#include "pam_radius_auth.h"
#define DPRINT if (opt_debug & PAM_DEBUG_ARG) _pam_log
diff --git a/src/pam_radius_auth.h b/src/pam_radius_auth.h
index 95f262c..defec5c 100644
--- a/src/pam_radius_auth.h
+++ b/src/pam_radius_auth.h
@@ -3,6 +3,9 @@
#include "config.h"
+#include <limits.h>
+#include <errno.h>
+#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/resource.h>