summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-06-04 03:15:41 +0000
committerTim Potter <tpot@samba.org>2001-06-04 03:15:41 +0000
commit384a328457676f1ece408fd0dca0a4c6954da872 (patch)
treeb3ac25e3e3f3a15486d39c5d5e06dc3cd04660e6
parenta5f7cd89e17fe84a9661602fd0077ed10d415e9d (diff)
downloadsamba-384a328457676f1ece408fd0dca0a4c6954da872.tar.gz
samba-384a328457676f1ece408fd0dca0a4c6954da872.tar.bz2
samba-384a328457676f1ece408fd0dca0a4c6954da872.zip
Compile fix for Solaris.
(This used to be commit 7a1929b6caeb9b349510f7f4ae394246b9c5adc3)
-rw-r--r--source3/include/includes.h37
1 files changed, 29 insertions, 8 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index e7d983064f..50d1e4d72d 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -697,17 +697,38 @@ typedef struct smb_wpasswd {
#define UNI_XDIGIT 0x8
#define UNI_SPACE 0x10
-#ifdef HAVE_NSS_H
+#ifdef HAVE_NSS_COMMON_H
+
+/* Sun Solaris */
+
+#include <nss_common.h>
+#include <nss_dbdefs.h>
+#include <nsswitch.h>
+
+typedef nss_status_t NSS_STATUS;
+
+#define NSS_STATUS_SUCCESS NSS_SUCCESS
+#define NSS_STATUS_NOTFOUND NSS_NOTFOUND
+#define NSS_STATUS_UNAVAIL NSS_UNAVAIL
+#define NSS_STATUS_TRYAGAIN NSS_TRYAGAIN
+
+#elif HAVE_NSS_H
+
+/* GNU */
+
#include <nss.h>
-#else
-/* Minimal needed to compile.. */
+typedef enum nss_status NSS_STATUS;
+
+#else /* Nothing's defined. Neither gnu nor sun */
-enum nss_status {
- NSS_STATUS_SUCCESS,
- NSS_STATUS_NOTFOUND,
- NSS_STATUS_UNAVAIL
-};
+typedef enum
+{
+ NSS_STATUS_SUCCESS,
+ NSS_STATUS_NOTFOUND,
+ NSS_STATUS_UNAVAIL,
+ NSS_STATUS_TRYAGAIN
+} NSS_STATUS;
#endif