On Dec 17 18:15, Kizito Porta Balanyà wrote: > Hello, > > I'm trying to compile monit in cygwin, but I get an error: > > src/process/sysdep_UNKNOWN.c:218:34: error: ‘GLOB_ONLYDIR’ not > declared (first use)) > if ((rv = glob("/proc/[0-9]*", GLOB_ONLYDIR, NULL, &globbuf))) { > > The function is: > if ((rv = glob("/proc/[0-9]*", GLOB_ONLYDIR, NULL, &globbuf))) { > LogError("system statistic error -- glob failed: %d (%s)\n", rv, > STRERROR); > return FALSE; > } > > 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 -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
pgpxbFbyopQ4K.pgp
Description: PGP signature