git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Stefan Sperling <stsp@stsp.name>
Date
Mar 16, 2011, 10:37 UTC
Message-ID
<1300271879-2050-1-git-send-email-stsp@stsp.name>

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: Jonathan Nieder
Message 1 of 7 in “Include headers for getrlimit() in sha1_file.c”
  1. Include headers for getrlimit() in sha1_file.cStefan Sperling, Mar 16, 2011
  2. Jonathan NiederMar 18, 2011
  3. Arnaud LacombeMar 19, 2011
  4. Stefan SperlingMar 19, 2011
  5. compat: add missing #include <sys/resource.h>Jonathan Nieder, Mar 31, 2011
  6. Jonathan NiederApr 3, 2011
  7. Junio C HamanoApr 3, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.