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

[PATCH] some systems don't have (and need) sys/select.h

From
Robert Schiele <rschiele@gmail.com>
Date
Jan 24, 2008, 18:34 UTC
Message-ID
<20080124183446.GJ30676@schiele.dyndns.org>

The select stuff is already in sys/time.h on on some systems like HP-UX thus we should not include sys/select.h in that case.

Signed-off-by: Robert Schiele <rschiele@gmail.com>
---
This patch replaces my previously sent patch
"HP-UX traditionally has no sys/select.h".
 Makefile          |    5 +++++
 git-compat-util.h |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 5aac0c0..c9e54b1 100644
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,8 @@ all::
 #
 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
 #
+# Define NO_SYS_SELECT_H if you don't have sys/select.h.
+#
 # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
 # Enable it on Windows.  By default, symrefs are still used.
 #
@@ -635,6 +637,9 @@ ifdef NO_UNSETENV
 	COMPAT_CFLAGS += -DNO_UNSETENV
 	COMPAT_OBJS += compat/unsetenv.o
 endif
+ifdef NO_SYS_SELECT_H
+	BASIC_CFLAGS += -DNO_SYS_SELECT_H
+endif
 ifdef NO_MMAP
 	COMPAT_CFLAGS += -DNO_MMAP
 	COMPAT_OBJS += compat/mmap.o
diff --git a/git-compat-util.h b/git-compat-util.h
index b6ef544..4df90cb 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -68,7 +68,9 @@
 #include <sys/poll.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
+#ifndef NO_SYS_SELECT_H
 #include <sys/select.h>
+#endif
 #include <assert.h>
 #include <regex.h>
 #include <netinet/in.h>
-- 
1.5.2.4
Next: Johannes Schindelin
Message 1 of 9 in “some systems don't have (and need) sys/select.h”
  1. some systems don't have (and need) sys/select.hRobert Schiele, Jan 24, 2008
  2. Johannes SchindelinJan 24, 2008
  3. Junio C HamanoJan 24, 2008
  4. Robert SchieleJan 24, 2008
  5. autoconf: Add test for sys/select.h header fileJakub Narebski, Jan 25, 2008
  6. Johannes SchindelinJan 25, 2008
  7. Robert SchieleJan 25, 2008
  8. Junio C HamanoJan 26, 2008
  9. Robert SchieleJan 26, 2008

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.