git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Include headers for getrlimit() in sha1_file.c
@ 2011-03-16 10:37 Stefan Sperling
  2011-03-18 20:23 ` Jonathan Nieder
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Sperling @ 2011-03-16 10:37 UTC (permalink / raw)
  To: git; +Cc: Stefan Sperling

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

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

end of thread, other threads:[~2011-04-03 19:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-16 10:37 [PATCH] Include headers for getrlimit() in sha1_file.c Stefan Sperling
2011-03-18 20:23 ` 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

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).