1 From 5a5dfcad6ba96d12d68bd7b39279215a8fee70d3 Mon Sep 17 00:00:00 2001
2 From: Tias Guns <tias@ulyssis.org>
3 Date: Sun, 10 Jun 2012 14:19:01 +0200
4 Subject: [PATCH] inetd: fix build failure in Android
6 Signed-off-by: Tias Guns <tias@ulyssis.org>
7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
8 (cherry picked from commit 64f763b42a43cbf36e401690ff6767c25575e520)
10 networking/inetd.c | 1 +
11 1 file changed, 1 insertion(+)
15 From 246ea72843d5b7e9d4cd902dc5e9d71359196303 Mon Sep 17 00:00:00 2001
16 From: Mike Frysinger <vapier@gentoo.org>
17 Date: Thu, 5 Jul 2012 23:19:09 -0400
18 Subject: [PATCH] include sys/resource.h where needed
20 We use functions from sys/resource.h in misc applets, but don't include
21 the header. This breaks building with newer glibc versions, so add the
24 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
25 (cherry picked from commit c5fe9f7b723f949457263ef8e22ab807d5b549ce)
27 loginutils/passwd.c | 1 +
28 miscutils/time.c | 1 +
29 networking/inetd.c | 1 +
30 networking/ntpd.c | 1 +
31 networking/ntpd_simple.c | 1 +
33 shell/shell_common.c | 1 +
34 7 files changed, 7 insertions(+)
36 diff --git a/loginutils/passwd.c b/loginutils/passwd.c
37 index b83db00..a7006f0 100644
38 --- a/loginutils/passwd.c
39 +++ b/loginutils/passwd.c
44 +#include <sys/resource.h> /* setrlimit */
46 static void nuke_str(char *str)
48 diff --git a/miscutils/time.c b/miscutils/time.c
49 index 945f15f..ffed386 100644
50 --- a/miscutils/time.c
51 +++ b/miscutils/time.c
53 //usage: "\n -v Verbose"
56 +#include <sys/resource.h> /* getrusage */
58 /* Information on the resources used by a child process. */
60 diff --git a/networking/inetd.c b/networking/inetd.c
61 index 1308d74..00baf69 100644
62 --- a/networking/inetd.c
63 +++ b/networking/inetd.c
65 //usage: "\n (default: 0 - disabled)"
68 +#include <sys/resource.h> /* setrlimit */
69 +#include <sys/socket.h> /* un.h may need this */
73 diff --git a/networking/ntpd.c b/networking/ntpd.c
74 index 603801e..b885215 100644
75 --- a/networking/ntpd.c
76 +++ b/networking/ntpd.c
80 #include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
81 +#include <sys/resource.h> /* setpriority */
82 #include <sys/timex.h>
83 #ifndef IPTOS_LOWDELAY
84 # define IPTOS_LOWDELAY 0x10
85 diff --git a/networking/ntpd_simple.c b/networking/ntpd_simple.c
86 index 4ad44e4..1b7c66b 100644
87 --- a/networking/ntpd_simple.c
88 +++ b/networking/ntpd_simple.c
92 #include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
93 +#include <sys/resource.h> /* setpriority */
94 #ifndef IPTOS_LOWDELAY
95 # define IPTOS_LOWDELAY 0x10
97 diff --git a/runit/chpst.c b/runit/chpst.c
98 index ac296ba..ed72c8b 100644
101 @@ -91,6 +91,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
102 //usage: "\n a SIGXCPU after N seconds"
105 +#include <sys/resource.h> /* getrlimit */
108 Five applets here: chpst, envdir, envuidgid, setuidgid, softlimit.
109 diff --git a/shell/shell_common.c b/shell/shell_common.c
110 index 51c92d6..780e27e 100644
111 --- a/shell/shell_common.c
112 +++ b/shell/shell_common.c
116 #include "shell_common.h"
117 +#include <sys/resource.h> /* getrlimit */
119 const char defifsvar[] ALIGN1 = "IFS= \t\n";