git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Sven Strickroth <sven.strickroth@tu-clausthal.de>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] Fixed compilation with Visual Studio by including poll.h
Date: Fri, 20 Apr 2012 13:47:23 -0700	[thread overview]
Message-ID: <20120420204722.GD13103@sigill.intra.peff.net> (raw)
In-Reply-To: <4F91C8FF.7070402@tu-clausthal.de>

On Fri, Apr 20, 2012 at 10:37:19PM +0200, Sven Strickroth wrote:

> upload-archive.c and upload-pack.c use pollfd struct and POLLIN constant
> which are defined in poll.h. However, poll.h is not included.

This should already be included by git-compat-util.h:

  $ grep -C1 poll.h git-compat-util.h
  #ifndef NO_SYS_POLL_H
  #include <sys/poll.h>
  #else
  #include <poll.h>
  #endif

It looks like we will prefer sys/poll.h if it exists. The official XSI
location is "poll.h", but I guess in practice they are equivalent on
most systems if you have both (certainly on Linux, poll.h just includes
sys/poll.h).

Does your environments have a sys/poll.h that exists isn't sufficient to
use poll? Maybe we need to tweak git-compat-util to include both if they
both exist.

-Peff

  reply	other threads:[~2012-04-20 20:47 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 [this message]
2012-04-20 21:26   ` Sven Strickroth
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=20120420204722.GD13103@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sven.strickroth@tu-clausthal.de \
    /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).