From: Stefan Sperling <stsp@stsp.name>
To: git@vger.kernel.org
Cc: Stefan Sperling <stsp@stsp.name>
Subject: [PATCH] Include headers for getrlimit() in sha1_file.c
Date: Wed, 16 Mar 2011 11:37:59 +0100 [thread overview]
Message-ID: <1300271879-2050-1-git-send-email-stsp@stsp.name> (raw)
Fixes compilation error on OpenBSD:
sha1_file.c: In function 'open_packed_git_1':
sha1_file.c:718: error: storage size of 'lim' isn't known
sha1_file.c:721: warning: implicit declaration of function 'getrlimit'
sha1_file.c:721: error: 'RLIMIT_NOFILE' undeclared (first use in this function)
sha1_file.c:718: warning: unused variable 'lim'
Signed-off-by: Stefan Sperling <stsp@stsp.name>
---
sha1_file.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/sha1_file.c b/sha1_file.c
index b4fcca8..f969b10 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -18,6 +18,10 @@
#include "pack-revindex.h"
#include "sha1-lookup.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+
#ifndef O_NOATIME
#if defined(__linux__) && (defined(__i386__) || defined(__PPC__))
#define O_NOATIME 01000000
--
1.7.3.5
next reply other threads:[~2011-03-16 10:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-16 10:37 Stefan Sperling [this message]
2011-03-18 20:23 ` [PATCH] Include headers for getrlimit() in sha1_file.c Jonathan Nieder
2011-03-19 0:22 ` Arnaud Lacombe
2011-03-19 9:09 ` Stefan Sperling
2011-03-31 22:59 ` [PATCH maint resend] compat: add missing #include <sys/resource.h> Jonathan Nieder
2011-04-03 19:13 ` Jonathan Nieder
2011-04-03 19:27 ` Junio C Hamano
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=1300271879-2050-1-git-send-email-stsp@stsp.name \
--to=stsp@stsp.name \
--cc=git@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).