summaryrefslogtreecommitdiff
path: root/databases/nss-pgsql/patches/patch-src_nss-pgsql.h
blob: 2b1bc9f2329c663867dafc4e13d9370965431193 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
$NetBSD: patch-src_nss-pgsql.h,v 1.3 2015/12/29 04:04:27 dholland Exp $

Adds checks for header files

--- src/nss-pgsql.h.orig	2006-01-09 22:33:07.000000000 +0000
+++ src/nss-pgsql.h
@@ -11,11 +11,15 @@
 
 #  ifdef HAVE_NSS_H
 #    include <nss.h>
+#  elif HAVE_NSSWITCH_H
+#    include <nsswitch.h>
 #  endif
 
 #  include <pwd.h>
 #  include <grp.h>
-#  include <shadow.h>
+#  ifdef HAVE_SHADOW_H
+#    include <shadow.h>
+#  endif
 #  include <sys/types.h>
 
 #define CFGFILE SYSCONFDIR"/nss-pgsql.conf"
@@ -71,6 +75,7 @@ size_t backend_initgroups_dyn(const char
 										long int limit,
 										int *errnop);
 
+#ifdef HAVE_SHADOW_H
 enum nss_status backend_getspent(struct spwd *result,
 											char *buffer,
 											size_t buflen,
@@ -82,6 +87,7 @@ enum nss_status backend_getspnam(const c
 											size_t buflen,
 											int *errnop);
 
+#endif
 void print_err(const char *msg, ...);
 void print_msg(const char *msg, ...);