summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorRobert Schiele <rschiele@gmail.com>2008-01-24 18:34:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-01-24 22:01:28 (GMT)
commit2600973f2c565792b71e3aed62c40efb09e08c6e (patch)
tree9b3ad6e65bf1183825043ad9f10f7f7870584d6c /git-compat-util.h
parentcab31fa076253fcfafa7572c24e40f12a1e09ae3 (diff)
downloadgit-2600973f2c565792b71e3aed62c40efb09e08c6e.zip
git-2600973f2c565792b71e3aed62c40efb09e08c6e.tar.gz
git-2600973f2c565792b71e3aed62c40efb09e08c6e.tar.bz2
pre-POSIX.1-2001 systems do not have <sys/select.h>
POSIX.1-2001 has declaration of select(2) in <sys/select.h>, but in the previous version of SUS, it was declared in <sys/time.h> (which is already included in git-compat-util.h). This introduces NO_SYS_SELECT_H macro in the Makefile to be set on older systems, to skip inclusion of <sys/select.h> that does not exist on them. We could check _POSIX_VERSION with 200112L and do this automatically, but earlier it was reported that the approach does not work well on some vintage of HP-UX. Other systems may get _POSIX_VERSION itself wrong. At least for now, this manual configuration is safer. Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h2
1 files changed, 2 insertions, 0 deletions
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>