blob: 145538412941c3f313ed6dfd94359a435462c1e1 [file] [log] [blame]
Patrick Williamsc0f7c042017-02-23 20:41:17 -06001Upstream-Status: Backport
2
3Signed-off-by: Kai Kang <kai.kang@windriver.com>
4---
5From c7a76237e7a51a69d0236ebfc191e462f805cf4e Mon Sep 17 00:00:00 2001
6From: Lars Wendler <polynomial-c@gentoo.org>
7Date: Mon, 15 Feb 2016 14:42:14 +0100
8Subject: [PATCH] Don't build rpc.rquotad when --disable-rpc was requested.
9
10This fixes a buch of undefined references:
11
12x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O2 -pipe -D_GNU_SOURCE -Wa
13ll -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -pie -Wl,-O1 -Wl,--hash-st
14yle=gnu -Wl,--sort-common -Wl,--as-needed -o rpc.rquotad rquota_server.o rquota_
15svc.o svc_socket.o libquota.a
16rquota_svc.o: In function `rquotaprog_2':
17rquota_svc.c:(.text+0x1d3): undefined reference to `xdr_setquota_rslt'
18rquota_svc.c:(.text+0x1da): undefined reference to `xdr_ext_setquota_args'
19rquota_svc.c:(.text+0x2b2): undefined reference to `xdr_setquota_rslt'
20rquota_svc.c:(.text+0x2b9): undefined reference to `xdr_ext_setquota_args'
21rquota_svc.c:(.text+0x2ff): undefined reference to `xdr_getquota_rslt'
22rquota_svc.c:(.text+0x306): undefined reference to `xdr_ext_getquota_args'
23rquota_svc.c:(.text+0x31a): undefined reference to `xdr_getquota_rslt'
24rquota_svc.c:(.text+0x321): undefined reference to `xdr_ext_getquota_args'
25rquota_svc.o: In function `rquotaprog_1':
26rquota_svc.c:(.text+0x3f3): undefined reference to `xdr_setquota_rslt'
27rquota_svc.c:(.text+0x3fa): undefined reference to `xdr_setquota_args'
28rquota_svc.c:(.text+0x4d2): undefined reference to `xdr_setquota_rslt'
29rquota_svc.c:(.text+0x4d9): undefined reference to `xdr_setquota_args'
30rquota_svc.c:(.text+0x51f): undefined reference to `xdr_getquota_rslt'
31rquota_svc.c:(.text+0x526): undefined reference to `xdr_getquota_args'
32rquota_svc.c:(.text+0x53a): undefined reference to `xdr_getquota_rslt'
33rquota_svc.c:(.text+0x541): undefined reference to `xdr_getquota_args'
34collect2: error: ld returned 1 exit status
35Makefile:901: recipe for target 'rpc.rquotad' failed
36
37Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
38Signed-off-by: Jan Kara <jack@suse.cz>
39---
40 Makefile.am | 5 ++++-
41 1 file changed, 4 insertions(+), 1 deletion(-)
42
43diff --git a/Makefile.am b/Makefile.am
44index 77f8400..6d7ea0e 100644
45--- a/Makefile.am
46+++ b/Makefile.am
47@@ -116,8 +116,11 @@ sbin_PROGRAMS = \
48 xqmstats \
49 edquota \
50 setquota \
51- convertquota \
52+ convertquota
53+if WITH_RPC
54+sbin_PROGRAMS += \
55 rpc.rquotad
56+endif
57 if WITH_NETLINK
58 sbin_PROGRAMS += \
59 quota_nld
60--
612.6.1
62