Thread (6 messages) 6 messages, 3 authors, 2016-06-15
STALE3758d

[PATCH] Include headers for getrlimit() in sha1_file.c

From: Stefan Sperling <hidden>
Date: 2016-06-15 22:50:47
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help