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

[PATCH/RFT] upload-pack.c: <sys/poll.h> includes <ctype.h> on OpenBSD 3.8

From
Junio C Hamano <junkio@cox.net>
Date
Jun 30, 2006, 18:30 UTC
Message-ID
<7vr716h4xm.fsf_-_@assigned-by-dhcp.cox.net>
In-Reply-To
<7vk66yilxd.fsf@assigned-by-dhcp.cox.net>

Merlyn reports that <sys/poll.h> on OpenBSD 3.8 includes <ctype.h> and having our custom ctype (done in git-compat-util.h which is included via cache.h) makes upload-pack.c uncompilable. Try to work it around by including the system headers first.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 * Can somebody with OpenBSD who can reproduce the original
   problem confirm or reject this patch, so that the issue can
   be resolved before 1.4.1, please?
diff --git a/upload-pack.c b/upload-pack.c
index 2b70c3d..b18eb9b 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -1,3 +1,6 @@
+#include <signal.h>
+#include <sys/wait.h>
+#include <sys/poll.h>
 #include "cache.h"
 #include "refs.h"
 #include "pkt-line.h"
@@ -5,9 +8,6 @@ #include "tag.h"
 #include "object.h"
 #include "commit.h"
 #include "exec_cmd.h"
-#include <signal.h>
-#include <sys/poll.h>
-#include <sys/wait.h>
 
 static const char upload_pack_usage[] = "git-upload-pack [--strict] [--timeout=nn] <dir>";
 
Previous: Junio C HamanoNext: Jakub Narebski
Message 5 of 6 in “fc046a75d539a78e6b2c16534c4078617a69a327 fails on OpenBSD 3.8”
  1. Randal L. SchwartzJun 30, 2006
  2. Junio C HamanoJun 30, 2006
  3. Randal L. SchwartzJun 30, 2006
  4. Junio C HamanoJun 30, 2006
  5. upload-pack.c: <sys/poll.h> includes <ctype.h> on OpenBSD 3.8Junio C Hamano, Jun 30, 2006
  6. Jakub NarebskiJun 30, 2006

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.