busybox-1.20.2-sys-resource.patch 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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
  5. Signed-off-by: Tias Guns <tias@ulyssis.org>
  6. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
  7. (cherry picked from commit 64f763b42a43cbf36e401690ff6767c25575e520)
  8. ---
  9. networking/inetd.c | 1 +
  10. 1 file changed, 1 insertion(+)
  11. --
  12. 1.7.12
  13. From 246ea72843d5b7e9d4cd902dc5e9d71359196303 Mon Sep 17 00:00:00 2001
  14. From: Mike Frysinger <vapier@gentoo.org>
  15. Date: Thu, 5 Jul 2012 23:19:09 -0400
  16. Subject: [PATCH] include sys/resource.h where needed
  17. We use functions from sys/resource.h in misc applets, but don't include
  18. the header. This breaks building with newer glibc versions, so add the
  19. include where needed.
  20. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  21. (cherry picked from commit c5fe9f7b723f949457263ef8e22ab807d5b549ce)
  22. ---
  23. loginutils/passwd.c | 1 +
  24. miscutils/time.c | 1 +
  25. networking/inetd.c | 1 +
  26. networking/ntpd.c | 1 +
  27. networking/ntpd_simple.c | 1 +
  28. runit/chpst.c | 1 +
  29. shell/shell_common.c | 1 +
  30. 7 files changed, 7 insertions(+)
  31. diff --git a/loginutils/passwd.c b/loginutils/passwd.c
  32. index b83db00..a7006f0 100644
  33. --- a/loginutils/passwd.c
  34. +++ b/loginutils/passwd.c
  35. @@ -15,6 +15,7 @@
  36. #include "libbb.h"
  37. #include <syslog.h>
  38. +#include <sys/resource.h> /* setrlimit */
  39. static void nuke_str(char *str)
  40. {
  41. diff --git a/miscutils/time.c b/miscutils/time.c
  42. index 945f15f..ffed386 100644
  43. --- a/miscutils/time.c
  44. +++ b/miscutils/time.c
  45. @@ -16,6 +16,7 @@
  46. //usage: "\n -v Verbose"
  47. #include "libbb.h"
  48. +#include <sys/resource.h> /* getrusage */
  49. /* Information on the resources used by a child process. */
  50. typedef struct {
  51. diff --git a/networking/inetd.c b/networking/inetd.c
  52. index 1308d74..00baf69 100644
  53. --- a/networking/inetd.c
  54. +++ b/networking/inetd.c
  55. @@ -165,6 +165,8 @@
  56. //usage: "\n (default: 0 - disabled)"
  57. #include <syslog.h>
  58. +#include <sys/resource.h> /* setrlimit */
  59. +#include <sys/socket.h> /* un.h may need this */
  60. #include <sys/un.h>
  61. #include "libbb.h"
  62. diff --git a/networking/ntpd.c b/networking/ntpd.c
  63. index 603801e..b885215 100644
  64. --- a/networking/ntpd.c
  65. +++ b/networking/ntpd.c
  66. @@ -46,6 +46,7 @@
  67. #include "libbb.h"
  68. #include <math.h>
  69. #include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
  70. +#include <sys/resource.h> /* setpriority */
  71. #include <sys/timex.h>
  72. #ifndef IPTOS_LOWDELAY
  73. # define IPTOS_LOWDELAY 0x10
  74. diff --git a/networking/ntpd_simple.c b/networking/ntpd_simple.c
  75. index 4ad44e4..1b7c66b 100644
  76. --- a/networking/ntpd_simple.c
  77. +++ b/networking/ntpd_simple.c
  78. @@ -7,6 +7,7 @@
  79. */
  80. #include "libbb.h"
  81. #include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
  82. +#include <sys/resource.h> /* setpriority */
  83. #ifndef IPTOS_LOWDELAY
  84. # define IPTOS_LOWDELAY 0x10
  85. #endif
  86. diff --git a/runit/chpst.c b/runit/chpst.c
  87. index ac296ba..ed72c8b 100644
  88. --- a/runit/chpst.c
  89. +++ b/runit/chpst.c
  90. @@ -91,6 +91,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  91. //usage: "\n a SIGXCPU after N seconds"
  92. #include "libbb.h"
  93. +#include <sys/resource.h> /* getrlimit */
  94. /*
  95. Five applets here: chpst, envdir, envuidgid, setuidgid, softlimit.
  96. diff --git a/shell/shell_common.c b/shell/shell_common.c
  97. index 51c92d6..780e27e 100644
  98. --- a/shell/shell_common.c
  99. +++ b/shell/shell_common.c
  100. @@ -18,6 +18,7 @@
  101. */
  102. #include "libbb.h"
  103. #include "shell_common.h"
  104. +#include <sys/resource.h> /* getrlimit */
  105. const char defifsvar[] ALIGN1 = "IFS= \t\n";
  106. --
  107. 1.7.12