summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor van Poppelen <[email protected]>2015-01-31 16:17:56 -0500
committerVictor van Poppelen <[email protected]>2015-01-31 16:17:56 -0500
commit93273af664c1f77cd9ad7e7e10b915503a90c561 (patch)
treee9b105702480f8c893bf3fc290bf8082372e5182
parent65c1bc251ce65fb26e67ace1cf24f982ae8b0411 (diff)
parent096d44d3d5f0b7cc6f6174234581497a6b0bf51d (diff)
Merge pull request #1 from squiffy/master
BSD and OS X support
-rw-r--r--golang-pam.c2
-rw-r--r--pamdefs.c16
2 files changed, 17 insertions, 1 deletions
diff --git a/golang-pam.c b/golang-pam.c
index ea5fd88..58f567c 100644
--- a/golang-pam.c
+++ b/golang-pam.c
@@ -1,4 +1,4 @@
-#include <security/_pam_types.h>
+#include <security/pam_types.h>
#include <security/pam_appl.h>
#include <stdlib.h>
#include <string.h>
diff --git a/pamdefs.c b/pamdefs.c
index ef0bbc3..81a0fbd 100644
--- a/pamdefs.c
+++ b/pamdefs.c
@@ -30,9 +30,25 @@ enum {
$ABORT = PAM_ABORT,
$AUTHTOK_EXPIRED = PAM_AUTHTOK_EXPIRED,
$MODULE_UNKNOWN = PAM_MODULE_UNKNOWN,
+
+#if !defined(PAM_BAD_ITEM)
+ $BAD_ITEM = PAM_SYMBOL_ERR,
+#else
$BAD_ITEM = PAM_BAD_ITEM,
+#endif
+
+#if !defined(PAM_CONV_AGAIN)
+ $CONV_AGAIN = PAM_SYMBOL_ERR,
+#else
$CONV_AGAIN = PAM_CONV_AGAIN,
+#endif
+
+#if !defined(PAM_INCOMPLETE)
+ $INCOMPLETE = PAM_SYMBOL_ERR
+#else
$INCOMPLETE = PAM_INCOMPLETE
+#endif
+
};
enum {