summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-yellow-pages-support-optional.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-yellow-pages-support-optional.patch')
-rw-r--r--meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-yellow-pages-support-optional.patch156
1 files changed, 156 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-yellow-pages-support-optional.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-yellow-pages-support-optional.patch
new file mode 100644
index 0000000000..41996906c1
--- /dev/null
+++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-yellow-pages-support-optional.patch
@@ -0,0 +1,156 @@
1autofs-5.0.7 - make yellow pages support optional
2
3From: Chris Packham <chris.packham@alliedtelesis.co.nz>
4
5If rpcsvc/ypclnt.h is not available don't compile in Yellow Pages
6support.
7---
8
9 CHANGELOG | 1 +
10 Makefile.conf.in | 3 +++
11 configure | 16 ++++++++++++++++
12 configure.in | 9 +++++++++
13 include/config.h.in | 3 +++
14 lib/rpc_subs.c | 1 -
15 modules/Makefile | 9 +++++++--
16 7 files changed, 39 insertions(+), 3 deletions(-)
17
18
19diff --git a/CHANGELOG b/CHANGELOG
20index 1130db6..ed17163 100644
21--- a/CHANGELOG
22+++ b/CHANGELOG
23@@ -25,6 +25,7 @@
24 - don't schedule new alarms after readmap.
25 - use numeric protocol ids instead of protoent structs.
26 - lib/defaults.c: use WITH_LDAP conditional around LDAP types.
27+- make yellow pages support optional.
28
29 25/07/2012 autofs-5.0.7
30 =======================
31diff --git a/Makefile.conf.in b/Makefile.conf.in
32index 802318b..3766d45 100644
33--- a/Makefile.conf.in
34+++ b/Makefile.conf.in
35@@ -43,6 +43,9 @@ NISPLUS = @HAVE_NISPLUS@
36 # SMBFS support: yes (1) no (0)
37 SMBFS = @HAVE_SMBMOUNT@
38
39+# YellowPages support: yes (1) no (0)
40+YPCLNT = @HAVE_YPCLNT@
41+
42 # Support for calling e2fsck when mounting ext2 filesystems
43 EXT2FS = @HAVE_E2FSCK@
44
45diff --git a/configure b/configure
46index 3722a46..cf6428c 100755
47--- a/configure
48+++ b/configure
49@@ -614,6 +614,7 @@ XML_FLAGS
50 LIBLDAP
51 HAVE_LDAP
52 LDAP_FLAGS
53+HAVE_YPCLNT
54 HAVE_NISPLUS
55 EGREP
56 GREP
57@@ -4575,6 +4576,21 @@ fi
58
59
60
61+# YellowPages support?
62+HAVE_YPCLNT=0
63+ac_fn_c_check_header_mongrel "$LINENO" "rpcsvc/ypclnt.h" "ac_cv_header_rpcsvc_ypclnt_h" "$ac_includes_default"
64+if test "x$ac_cv_header_rpcsvc_ypclnt_h" = xyes; then :
65+ HAVE_YPCLNT=1
66+fi
67+
68+
69+
70+if test "$HAVE_YPCLNT" = "1"; then
71+
72+$as_echo "#define HAVE_YPCLNT 1" >>confdefs.h
73+
74+fi
75+
76 #
77 # OpenLDAP support? Expect that this may have a special directory...
78 #
79diff --git a/configure.in b/configure.in
80index 90bda62..363c376 100644
81--- a/configure.in
82+++ b/configure.in
83@@ -213,6 +213,15 @@ HAVE_NISPLUS=0
84 AC_CHECK_HEADER(rpcsvc/nis.h, HAVE_NISPLUS=1)
85 AC_SUBST(HAVE_NISPLUS)
86
87+# YellowPages support?
88+HAVE_YPCLNT=0
89+AC_CHECK_HEADER([rpcsvc/ypclnt.h], HAVE_YPCLNT=1)
90+AC_SUBST(HAVE_YPCLNT)
91+if test "$HAVE_YPCLNT" = "1"; then
92+ AC_DEFINE(HAVE_YPCLNT, 1,
93+ [Define if using YellowPages])
94+fi
95+
96 #
97 # OpenLDAP support? Expect that this may have a special directory...
98 #
99diff --git a/include/config.h.in b/include/config.h.in
100index 9bdf98a..7f1c5b5 100644
101--- a/include/config.h.in
102+++ b/include/config.h.in
103@@ -72,6 +72,9 @@
104 /* Define to 1 if you have the <unistd.h> header file. */
105 #undef HAVE_UNISTD_H
106
107+/* Define if using YellowPages */
108+#undef HAVE_YPCLNT
109+
110 /* Use libxml2 tsd usage workaround */
111 #undef LIBXML2_WORKAROUND
112
113diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
114index ad1d557..718caf9 100644
115--- a/lib/rpc_subs.c
116+++ b/lib/rpc_subs.c
117@@ -27,7 +27,6 @@
118 #include <net/if.h>
119 #include <netinet/in.h>
120 #include <arpa/inet.h>
121-#include <rpcsvc/ypclnt.h>
122 #include <errno.h>
123 #include <sys/ioctl.h>
124 #include <ctype.h>
125diff --git a/modules/Makefile b/modules/Makefile
126index 939da7c..c5deb24 100644
127--- a/modules/Makefile
128+++ b/modules/Makefile
129@@ -5,13 +5,13 @@
130 -include ../Makefile.conf
131 include ../Makefile.rules
132
133-SRCS := lookup_yp.c lookup_file.c lookup_program.c lookup_userhome.c \
134+SRCS := lookup_file.c lookup_program.c lookup_userhome.c \
135 lookup_multi.c lookup_hosts.c lookup_dir.c \
136 parse_sun.c \
137 mount_generic.c mount_nfs.c mount_afs.c mount_autofs.c \
138 mount_changer.c mount_bind.c
139
140-MODS := lookup_yp.so lookup_file.so lookup_program.so lookup_userhome.so \
141+MODS := lookup_file.so lookup_program.so lookup_userhome.so \
142 lookup_multi.so lookup_hosts.so lookup_dir.so \
143 parse_sun.so \
144 mount_generic.so mount_nfs.so mount_afs.so mount_autofs.so \
145@@ -37,6 +37,11 @@ ifeq ($(NISPLUS), 1)
146 MODS += lookup_nisplus.so
147 endif
148
149+ifeq ($(YPCLNT), 1)
150+ SRCS += lookup_yp.c
151+ MODS += lookup_yp.so
152+endif
153+
154 ifeq ($(LDAP), 1)
155 SRCS += lookup_ldap.c
156 MODS += lookup_ldap.so