util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] prlimit: ensure necessary definitions are present
@ 2011-10-24 18:50 Sami Kerola
  2011-10-24 18:50 ` [PATCH 2/2] build-sys: build prstat only when prlimit() is present Sami Kerola
  2011-10-26 21:30 ` [PATCH 1/2] prlimit: ensure necessary definitions are present Karel Zak
  0 siblings, 2 replies; 3+ messages in thread
From: Sami Kerola @ 2011-10-24 18:50 UTC (permalink / raw)
  To: util-linux; +Cc: kerolasa

With Ubuntu linux-libc-dev 2.6.38-11.50 I got error mentioned
bellow. This patch fixes the issue.

prlimit.c:77:88: error: 'RLIMIT_RTTIME' undeclared here

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 configure.ac        |    1 +
 sys-utils/prlimit.c |    7 +++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 88aced9..873f1b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,6 +136,7 @@ AC_CHECK_HEADERS(
 	rpcsvc/nfs_prot.h \
 	stdlib.h \
 	asm/io.h \
+	asm-generic/resource.h \
 	sys/disk.h \
 	sys/disklabel.h \
 	sys/ioctl.h \
diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c
index 74c7fc9..25949f1 100644
--- a/sys-utils/prlimit.c
+++ b/sys-utils/prlimit.c
@@ -26,6 +26,9 @@
 #include <assert.h>
 #include <unistd.h>
 #include <sys/resource.h>
+#ifdef HAVE_ASM_GENERIC_RESOURCE_H
+# include <asm-generic/resource.h>
+#endif
 
 #include "c.h"
 #include "nls.h"
@@ -33,6 +36,10 @@
 #include "xalloc.h"
 #include "strutils.h"
 
+#ifndef RLIMIT_RTTIME
+# define RLIMIT_RTTIME 15
+#endif
+
 enum {
 	AS,
 	CORE,
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-26 21:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-24 18:50 [PATCH 1/2] prlimit: ensure necessary definitions are present Sami Kerola
2011-10-24 18:50 ` [PATCH 2/2] build-sys: build prstat only when prlimit() is present Sami Kerola
2011-10-26 21:30 ` [PATCH 1/2] prlimit: ensure necessary definitions are present Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).