error: structure has no member named `gl_matchc' (was: nginx-0.7.12)

Igor Sysoev is at rambler-co.ru
Tue Aug 26 21:00:47 MSD 2008


On Tue, Aug 26, 2008 at 10:42:48AM -0600, Jason Becker wrote:

> On Tue, Aug 26, 2008 at 10:20 AM, Igor Sysoev <is at rambler-co.ru> wrote:
> > Changes with nginx 0.7.12                                        26 Aug 2008
> 
> I cannot compile 0.7.12 on Ubuntu or CentOS.
> 
> ./configure --with-http_ssl_module && make && make install
> 
> throws:
> 
> src/os/unix/ngx_files.c: In function `ngx_read_glob':
> src/os/unix/ngx_files.c:283: error: structure has no member named `gl_matchc'
> make[1]: *** [objs/src/os/unix/ngx_files.o] Error 1
> make[1]: Leaving directory `/usr/src/nginx-0.7.12'
> make: *** [build] Error 2
> 
> Please advise.

The attached patch should fix the bug.


-- 
Igor Sysoev
http://sysoev.ru/en/
-------------- next part --------------
Index: src/os/unix/ngx_files.c
===================================================================
--- src/os/unix/ngx_files.c	(revision 1529)
+++ src/os/unix/ngx_files.c	(working copy)
@@ -280,8 +280,16 @@
 ngx_int_t
 ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name)
 {
-    if (gl->n < (size_t) gl->pglob.gl_matchc) {
+    size_t  count;
 
+#ifdef GLOB_NOMATCH
+    count = (size_t) gl->pglob.gl_pathc;
+#else
+    count = (size_t) gl->pglob.gl_matchc;
+#endif
+
+    if (gl->n < count) {
+
         name->len = (size_t) ngx_strlen(gl->pglob.gl_pathv[gl->n]);
         name->data = (u_char *) gl->pglob.gl_pathv[gl->n];
         gl->n++;


More information about the nginx mailing list