From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 1/2] prlimit: ensure necessary definitions are present
Date: Mon, 24 Oct 2011 20:50:44 +0200 [thread overview]
Message-ID: <1319482245-5515-1-git-send-email-kerolasa@iki.fi> (raw)
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
next reply other threads:[~2011-10-24 18:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-24 18:50 Sami Kerola [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1319482245-5515-1-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).