delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/05/22/06:37:49

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
q=dns; s=default; b=ExfPmGIOqzYRMCzgioJicPyyuuozDHAmGpe1/maoBeY
tPJEl9vyRadZsSPsBlRbgHlUDyulmeyhzvuD+NQceVTClc0Rs3n247u4uStxTcYE
gWTB73eaZUZINj49BGLGvtguCpzt1ux6vRSKOBG8QG3SwqFYTV8ExPwf5jNFvfKc
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
s=default; bh=rzugTJC6AoxiEEeobH7RWPSAWfs=; b=FAYbaG/6PnGFwhgBA
sowMEmzqHIpNn/eQfABUkgempM3P2jiCbemjlEuB6G0bQ8mKHKXttKQdBCd9fvlS
BBwU5qZa0dQ+Z4rR8DkWS7quipKEhzN2iBhw3qNbJBoiYB3IlBsmnxscXof4geUp
rxB8LA9XiU4chFC+6jz6EsJ/+U=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_20,RCVD_IN_SORBS_DUL,SPF_PASS autolearn=ham version=3.3.2
X-HELO: conuserg006-v.nifty.com
X-Nifty-SrcIP: [121.93.68.199]
Date: Fri, 22 May 2015 19:37:04 +0900
From: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
To: cygwin AT cygwin DOT com
Subject: Re: cannot build cygwin-2.0.2 because of net.cc (or because of some header.h)
Message-Id: <20150522193704.b0b9dfdaa4d63c61d7d5be55@nifty.ne.jp>
In-Reply-To: <20150521201509.9b9bfcffb07b3d9337de9e10@nifty.ne.jp>
References: <B8FA2086-BAFE-4B3E-9D52-2BE106CB9360 AT Denis-Excoffier DOT org> <20150521201509 DOT 9b9bfcffb07b3d9337de9e10 AT nifty DOT ne DOT jp>
Mime-Version: 1.0
X-IsSubscribed: yes

On Thu, 21 May 2015 20:15:09 +0900
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp> wrote:

> On Mon, 11 May 2015 17:52:04 +0200
> Denis Excoffier wrote:
> 
> > In order to successfully build cygwin-2.0.2-1 (for x86, both XP and W7) i had to apply
> > the following patch (below). No such problem with cygwin-2.0.1-1.
> 
> In my case, the same problem is caused by upgrading
> w32api-headers to 4.0.2-1. It does not result from
> difference between cygwin-2.0.2-1 and cygwin-2.0.1-1.

I have looked into this problem. The cause is as follows.

netioapi.h in w32api-headers 3.3.0-2 was using a macro-name
_INC_NETIOAPI for include-guard. By defining _INC_NETIOAPI,
net.cc avoids including netioapi.h, which conflicts with
if_nametoindex() and if_indextoname() in it.

However, the macro-name for include-guard in netioapi.h of
w32api-headers 4.0.2-1 has been changed to _NETIOAPI_H_.

As a result, net.cc fails to avoid including netioapi.h,
which causes confliction.

Thus, defining _NETIOAPI_H_ in net.cc resolves the problem.


diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index eaf6eb8..d6a631b 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -19,6 +19,7 @@ details. */
    TODO:  Convert if_nametoindex to cygwin_if_nametoindex and call
 	  system functions on Vista and later. */
 #define _INC_NETIOAPI
+#define _NETIOAPI_H_
 #include "winsup.h"
 #ifdef __x86_64__
 /* 2014-04-24: Current Mingw headers define sockaddr_in6 using u_long (8 byte)


-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019