diff options
author | Kai Kang <kai.kang@windriver.com> | 2016-07-19 15:39:20 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-26 08:56:27 +0100 |
commit | b6aa976756e24994a2c60086e5b8c9455c16bbb1 (patch) | |
tree | 01b50682f62e1d35049975ddc89f792953e6361d /meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch | |
parent | b7a2688ac86056c1128876beb0d70be68849371b (diff) | |
download | poky-b6aa976756e24994a2c60086e5b8c9455c16bbb1.tar.gz |
quota: make compile pass when disable rpc
When 'rpc' is not in PACKAGECONFIG, option '--disable-rpc' is passed to
configure and then compile fails. Backport patches to make quota build
successfully.
Update fcntl.patch that part of the patches are added by
0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch.
(From OE-Core rev: aff36f4c4d241707744fe13b6310fb894610a0f3)
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch')
-rw-r--r-- | meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch b/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch new file mode 100644 index 0000000000..6cea548edc --- /dev/null +++ b/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch | |||
@@ -0,0 +1,153 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
4 | --- | ||
5 | From f30e1ada8326463cc0af048afa058bc2f1dc9370 Mon Sep 17 00:00:00 2001 | ||
6 | From: Theodore Ts'o <tytso@mit.edu> | ||
7 | Date: Tue, 29 Mar 2016 20:48:04 -0400 | ||
8 | Subject: [PATCH] Allow building on systems that do not have rpc header files | ||
9 | |||
10 | Android's bionic C library doesn't have Sun RPC support. | ||
11 | |||
12 | Signed-off-by: Theodore Ts'o <tytso@mit.edu> | ||
13 | Signed-off-by: Jan Kara <jack@suse.cz> | ||
14 | --- | ||
15 | Makefile.am | 30 ++++++++++++++++-------------- | ||
16 | quotaops.c | 2 ++ | ||
17 | setquota.c | 2 ++ | ||
18 | 3 files changed, 20 insertions(+), 14 deletions(-) | ||
19 | |||
20 | diff --git a/Makefile.am b/Makefile.am | ||
21 | index 6d7ea0e..82db99f 100644 | ||
22 | --- a/Makefile.am | ||
23 | +++ b/Makefile.am | ||
24 | @@ -1,7 +1,5 @@ | ||
25 | ACLOCAL_AMFLAGS = -I m4 | ||
26 | |||
27 | -BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c | ||
28 | - | ||
29 | docdir = $(datadir)/doc/@PACKAGE@ | ||
30 | doc_DATA = \ | ||
31 | README.mailserver \ | ||
32 | @@ -12,11 +10,6 @@ doc_DATA = \ | ||
33 | doc/quotas.preformated \ | ||
34 | doc/quotas-1.eps | ||
35 | |||
36 | -rpcsvcdir = $(includedir)/rpcsvc | ||
37 | -rpcsvc_DATA = \ | ||
38 | - rquota.h \ | ||
39 | - rquota.x | ||
40 | - | ||
41 | sysconf_DATA = \ | ||
42 | warnquota.conf \ | ||
43 | quotatab \ | ||
44 | @@ -35,15 +28,12 @@ man_MANS = \ | ||
45 | quota.1 \ | ||
46 | quot.8 \ | ||
47 | repquota.8 \ | ||
48 | - rpc.rquotad.8 \ | ||
49 | rquota.3 \ | ||
50 | setquota.8 \ | ||
51 | warnquota.conf.5 \ | ||
52 | warnquota.8 \ | ||
53 | xqmstats.8 | ||
54 | |||
55 | -CLEANFILES = rquota.c rquota.h rquota_clnt.c | ||
56 | - | ||
57 | SUBDIRS = po | ||
58 | |||
59 | EXTRA_DIST = \ | ||
60 | @@ -55,9 +45,15 @@ EXTRA_DIST = \ | ||
61 | Changelog \ | ||
62 | ldap-scripts | ||
63 | |||
64 | -noinst_LIBRARIES = \ | ||
65 | - libquota.a \ | ||
66 | - librpcclient.a | ||
67 | +noinst_LIBRARIES = libquota.a | ||
68 | + | ||
69 | +if WITH_RPC | ||
70 | +rpcsvcdir = $(includedir)/rpcsvc | ||
71 | +rpcsvc_DATA = \ | ||
72 | + rquota.h \ | ||
73 | + rquota.x | ||
74 | + | ||
75 | +noinst_LIBRARIES += librpcclient.a | ||
76 | |||
77 | librpcclient_a_SOURCES = \ | ||
78 | rquota.c \ | ||
79 | @@ -67,8 +63,10 @@ librpcclient_a_SOURCES = \ | ||
80 | rquota_clnt.c | ||
81 | librpcclient_a_CFLAGS = -Wno-unused | ||
82 | |||
83 | -if WITH_RPC | ||
84 | RPCLIBS = librpcclient.a | ||
85 | +BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c | ||
86 | +CLEANFILES = rquota.c rquota.h rquota_clnt.c | ||
87 | +man_MANS += rpc.rquotad.8 | ||
88 | endif | ||
89 | |||
90 | libquota_a_SOURCES = \ | ||
91 | @@ -217,6 +215,7 @@ convertquota_LDADD = \ | ||
92 | libquota.a \ | ||
93 | $(RPCLIBS) | ||
94 | |||
95 | +if WITH_RPC | ||
96 | rpc_rquotad_SOURCES = \ | ||
97 | rquota_server.c \ | ||
98 | rquota_svc.c \ | ||
99 | @@ -225,6 +224,7 @@ rpc_rquotad_LDADD = \ | ||
100 | libquota.a \ | ||
101 | $(WRAP_LIBS) \ | ||
102 | $(RPCLIBS) | ||
103 | +endif | ||
104 | |||
105 | quota_nld_SOURCES = quota_nld.c | ||
106 | quota_nld_CFLAGS = \ | ||
107 | @@ -236,6 +236,7 @@ quota_nld_LDADD = \ | ||
108 | $(DBUS_LIBS) \ | ||
109 | $(LIBNL3_LIBS) | ||
110 | |||
111 | +if WITH_RPC | ||
112 | # ------------------ | ||
113 | # Rpcgen conversions | ||
114 | # ------------------ | ||
115 | @@ -250,6 +251,7 @@ quota_nld_LDADD = \ | ||
116 | rquota_clnt.c: rquota.x | ||
117 | @rm -f $@ | ||
118 | @$(RPCGEN) -l -o $@ $< | ||
119 | +endif | ||
120 | |||
121 | # -------- | ||
122 | # Quotaoff | ||
123 | diff --git a/quotaops.c b/quotaops.c | ||
124 | index 47ef9a7..136aec3 100644 | ||
125 | --- a/quotaops.c | ||
126 | +++ b/quotaops.c | ||
127 | @@ -34,7 +34,9 @@ | ||
128 | |||
129 | #include "config.h" | ||
130 | |||
131 | +#if defined(RPC) | ||
132 | #include <rpc/rpc.h> | ||
133 | +#endif | ||
134 | #include <sys/types.h> | ||
135 | #include <sys/stat.h> | ||
136 | #include <sys/file.h> | ||
137 | diff --git a/setquota.c b/setquota.c | ||
138 | index 51d7b3c..8ecd9c3 100644 | ||
139 | --- a/setquota.c | ||
140 | +++ b/setquota.c | ||
141 | @@ -7,7 +7,9 @@ | ||
142 | |||
143 | #include "config.h" | ||
144 | |||
145 | +#if defined(RPC) | ||
146 | #include <rpc/rpc.h> | ||
147 | +#endif | ||
148 | #include <sys/types.h> | ||
149 | #include <errno.h> | ||
150 | #include <stdio.h> | ||
151 | -- | ||
152 | 2.6.1 | ||
153 | |||