From: Sven Strickroth <sven.strickroth@tu-clausthal.de>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Fixed compilation with Visual Studio by including poll.h
Date: Fri, 20 Apr 2012 23:26:33 +0200 [thread overview]
Message-ID: <4F91D489.8050402@tu-clausthal.de> (raw)
In-Reply-To: <20120420204722.GD13103@sigill.intra.peff.net>
Windows does not have sys/poll.h. I have to use the one from compat/win32.
The problem is that
NO_SYS_POLL_H
is defined in compat/msvc.h in my environment.
And in git-compat-util.h
#ifndef NO_SYS_POLL_H
#include <sys/poll.h>
#else
#include <poll.h>
#endif
is before
#elif defined(_MSC_VER)
#include "compat/msvc.h"
. Moving it down, solves the issue for me. (Suppose this is a fix for my
scenario only).
diff --git a/git-compat-util.h b/git-compat-util.h
index ed11ad8..a96849c 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -111,11 +111,6 @@
#include <regex.h>
#include <utime.h>
#include <syslog.h>
-#ifndef NO_SYS_POLL_H
-#include <sys/poll.h>
-#else
-#include <poll.h>
-#endif
#if defined(__MINGW32__)
/* pull in Windows compatibility stuff */
#include "compat/mingw.h"
@@ -152,6 +147,11 @@
#define _ALL_SOURCE 1
#endif
#endif
+#ifndef NO_SYS_POLL_H
+#include <sys/poll.h>
+#else
+#include <poll.h>
+#endif
#ifndef NO_LIBGEN_H
#include <libgen.h>
--
Best regards,
Sven Strickroth
ClamAV, a GPL anti-virus toolkit http://www.clamav.net
PGP key id F5A9D4C4 @ any key-server
next prev parent reply other threads:[~2012-04-20 21:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 20:37 [PATCH] Fixed compilation with Visual Studio by including poll.h Sven Strickroth
2012-04-20 20:47 ` Jeff King
2012-04-20 21:26 ` Sven Strickroth [this message]
2012-04-20 21:58 ` Erik Faye-Lund
2012-04-20 21:51 ` Junio C Hamano
2012-04-20 23:23 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F91D489.8050402@tu-clausthal.de \
--to=sven.strickroth@tu-clausthal.de \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).