delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/12/17/12:24:44

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:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=GnPNLv84QRUXwgImBxKoyjuod1lUofdjDN2+FJk9PD9VNhexEhI85
m1dw6Lp4+/b8t79X4rF/aaOr8KRYkl44o3goBnw7a5FBOryvA808RTJONEvre/Hq
Fzk9IPQMU8f5dK7R//1v2/Y4Hg92YcaJy2STlb7IfsVkJ5K2d71kTU=
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:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=MmraBTN5oMydM1PyQfhdEQCZzXk=; b=OHAYr8SK5WBmGCxzVh6btzW5jW37
cDwZ0tkGKg4s1EHOJrhTNLuj0d8MSqcd78b8fWof8379xCtCVM2d7Lc3joEbayKd
rCt5EGW+B+h6I5Cf8dde12IGXRBeV5Dl60/19s8H+Ohl2XqqCoMfFZ5E/rbby5Le
hS+gAcUtKTM+xnA=
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=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Wed, 17 Dec 2014 18:24:24 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: GLOB_ONLYDIR not defined in glob.h
Message-ID: <20141217172424.GV10824@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAO2ddna_mWKtFvifQhg3-woHuFW--7XhkrdRcO25HSM+0s95Jg AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAO2ddna_mWKtFvifQhg3-woHuFW--7XhkrdRcO25HSM+0s95Jg@mail.gmail.com>
User-Agent: Mutt/1.5.23 (2014-03-12)

--Y4VYWfdFdHwFhC6D
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Dec 17 18:15, Kizito Porta Balany=C3=A0 wrote:
> Hello,
>=20
> I'm trying to compile monit in cygwin, but I get an error:
>=20
> src/process/sysdep_UNKNOWN.c:218:34: error: =E2=80=98GLOB_ONLYDIR=E2=80=
=99 not
> declared (first use))
>    if ((rv =3D glob("/proc/[0-9]*", GLOB_ONLYDIR, NULL, &globbuf))) {
>=20
> The function is:
>   if ((rv =3D glob("/proc/[0-9]*", GLOB_ONLYDIR, NULL, &globbuf))) {
>     LogError("system statistic error -- glob failed: %d (%s)\n", rv, STRE=
RROR);
>     return FALSE;
>   }
>=20
> Do you know why GLOB_ONLYDIR is not defined in glob.h?

Yes, it's a GNU extension, not provided by the FreeBSD code used in
Cygwin.  Since GLOB_ONLYDIR is a hint only, the code must not rely on
the glob function actually only returning directories anyway.

As a workaround, add this to the code:

  #ifndef GLOB_ONLYDIR
  #define GLOB_ONLYDIR 0
  #endif


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--Y4VYWfdFdHwFhC6D
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJUkbxIAAoJEPU2Bp2uRE+gf5sP/1E4wiGOkOwCwvsEzRXakBrD
GUy7ybAWfBkxJ+H3wTw0nVG3EEpYJCE0tu6tEAaxKmVhDVXQuT5+A2cLHHquHFJ5
SHgqqT0tmVOs1tvr2fCiwyHAJTV6IqKpFo4DLuhSIzPmULgYo+RRC0x2j503uGJy
v4NX/hzJxgB9ct6kXbz3sn7AvFTZFJlbpEstM6sFS2W9+zP+wO0n16fCRodBU30W
kLuI8E4WgQ+kb85D1kRKwZzGGdEHxhuvQ/4/7sjZKnYpLr7c5XV1QxLTVsfsBh41
Um2otIFP/UJEBqEscSEIcU9VYI8KafB+ddjSA+REkQ2Jc4BMX937nlaph57BpMpW
cBGj7XLoWBRp+iSl+JxJ+3R9d1iO7LnfVi6vVQUJHlXMntz001tbUSYmoqUgepdN
IHYtOonL1nYAvIWNeNkt5PM0w31AD773cKYQpDMTohr1BTnLdhZ4Os/p/fpBVLNF
fXkJ4m0UTsG50TT/vnz26MBROnXB33y7PTCc3KXO4BjsswNejcUNSTltLeC3etVO
hVBmSIANDlPLDUm9mJSfKeEJD0PMBeFbC2plrqwuyGvSKtRgSTTZnDyGlKXu+479
bUC1AF5SDfx1dK52y5gtrKsVPjjL8IIXPa+eDmylC+9CFSYmyNo7sV5f2PzciDBn
QC7yGpxR/Nf07eZWJVWv
=qWCV
-----END PGP SIGNATURE-----

--Y4VYWfdFdHwFhC6D--

- Raw text -


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