[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gethostname: fix build on mingw
From: |
Matthias Bolte |
Subject: |
Re: [PATCH] gethostname: fix build on mingw |
Date: |
Sat, 20 Mar 2010 14:59:49 +0100 |
2010/3/20 Eric Blake <address@hidden>:
> On 03/19/2010 05:35 PM, Matthias Bolte wrote:
>>> I believe this will solve the issue, but would appreciate some testing
>>> by Matthias. I also think that this is the same issue as:
>>> http://lists.gnu.org/archive/html/bug-gnulib/2010-01/msg00183.html
>>>
>>
>> I tested this patch and can confirm that this patch fixes the
>> gethostname compile issue on MinGW. Thanks.
>
> I think the patch works for including <sys/socket.h> first, but what
> happens if you include <unistd.h> or <winsock2.h> first? I think
> there's still some circularities that need to be resolved. That is,
> gnulib's unistd.h needs to be smarter about ensuring that winsock2.h is
> completely included prior to getting to its own replacements. I'm
> working on a respin along these lines...
>
The first version of the patch solves the problem for the current
gnulib code. But as you already supposed, if I change sockets.c to
include <winsock2.h> before <sys/socket.h> (actually before
"sockets.h", because it also includes <sys/socket.h>), then the
problem is back again. On the other hand including <unistd.h> before
<sys/socket.h> works.
Matthias
- Re: [PATCH] gethostname: fix build on mingw, (continued)
- Re: [PATCH] gethostname: fix build on mingw, Matthias Bolte, 2010/03/21
- Re: [PATCH] gethostname: fix build on mingw, Eric Blake, 2010/03/22
- [PATCHv4] gethostname: fix build on mingw, Eric Blake, 2010/03/22
- Re: [PATCHv4] gethostname: fix build on mingw, Simon Josefsson, 2010/03/22
- Re: [PATCHv4] gethostname: fix build on mingw, Eric Blake, 2010/03/22
- Re: [PATCHv4] gethostname: fix build on mingw, Simon Josefsson, 2010/03/22
- Re: [PATCHv4] gethostname: fix build on mingw, Eric Blake, 2010/03/22
- Re: [PATCHv4] gethostname: fix build on mingw, Matthias Bolte, 2010/03/22
- Re: [PATCHv4] gethostname: fix build on mingw, Bruno Haible, 2010/03/22
- [PATCH] gethostname: further tweaks, Eric Blake, 2010/03/22
- Re: [PATCH] gethostname: fix build on mingw,
Matthias Bolte <=