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

Re: [PATCH] Fixed compilation with Visual Studio by including poll.h

From
Erik Faye-Lund <kusmabite@gmail.com>
Date
Apr 20, 2012, 21:58 UTC
Message-ID
<CABPQNSb7NeHOnOy-zmNMA3Jp143oCYqsGjK=+uatsS9bYaN5hA@mail.gmail.com>
In-Reply-To
<4F91D489.8050402@tu-clausthal.de>

On Fri, Apr 20, 2012 at 11:26 PM, Sven Strickroth <sven.strickroth@tu-clausthal.de> wrote:

Show 17 quoted lines
> 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).
>

NO_SYS_POLL_H shouldn't be defined in compat/msvc.h, it should be defined by the build-system. Our Makefile already does this inside the "ifeq ($(uname_S),Windows)"-block.

How are you building Git?
Previous: Sven StrickrothNext: Junio C Hamano
Message 4 of 6 in “Fixed compilation with Visual Studio by including poll.h”
  1. Fixed compilation with Visual Studio by including poll.hSven Strickroth, Apr 20, 2012
  2. Jeff KingApr 20, 2012
  3. Sven StrickrothApr 20, 2012
  4. Erik Faye-LundApr 20, 2012
  5. Junio C HamanoApr 20, 2012
  6. Jeff KingApr 20, 2012

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.