Graham Leggett - 2013-04-06

The following patch fixes the broken signature for dav_new_error:

--- lib/dav_acl.c-orig 2013-04-06 16:21:21.121471891 +0000
+++ lib/dav_acl.c 2013-04-06 16:42:43.401153388 +0000
@@ -68,7 +68,7 @@

va_start(va, desc);
pch = desc ? apr_pvsprintf(r->pool, desc, va) : NULL;
- err = dav_new_error(r->pool, HTTP_FORBIDDEN, 0, pch);
+ err = dav_new_error(r->pool, HTTP_FORBIDDEN, 0, APR_EGENERAL, pch);
va_end(va);

err->tagname = "need-privileges";

The build then fails a few lines further down as follows:

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/httpd -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/libxml2 -I/usr/include/apr-1 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -MT libdavacl_la-dav_acl.lo -MD -MP -MF .deps/libdavacl_la-dav_acl.Tpo -c dav_acl.c -fPIC -DPIC -o .libs/libdavacl_la-dav_acl.o
dav_acl.c: In function 'dav_acl_privilege_error':
dav_acl.c:75: error: 'dav_error' has no member named 'childtags'
dav_acl.c: In function 'dav_acl_exec_error':
dav_acl.c:101: error: 'dav_error' has no member named 'childtags'
dav_acl.c:101: error: 'dav_error' has no member named 'childtags'
dav_acl.c:101: error: 'dav_error' has no member named 'childtags'
dav_acl.c:101: error: 'dav_error' has no member named 'childtags'
dav_acl.c: In function 'dav_acl_store_owner':
dav_acl.c:1504: error: 'dav_resource' has no member named 'acl_hooks'
dav_acl.c:1505: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
dav_acl.c:1505: error: 'acl' undeclared (first use in this function)
dav_acl.c:1505: error: (Each undeclared identifier is reported only once
dav_acl.c:1505: error: for each function it appears in.)
dav_acl.c:1505: warning: implicit declaration of function 'dav_get_acl_hooks'
dav_acl.c:1511: error: 'dav_resource' has no member named 'acl_hooks'
dav_acl.c: In function 'acl_store_acl':
dav_acl.c:1586: warning: passing argument 4 of 'dav_new_error' makes integer from pointer without a cast
/usr/include/httpd/mod_dav.h:139: note: expected 'apr_status_t' but argument is of type 'char *'
dav_acl.c:1586: error: too few arguments to function 'dav_new_error'
dav_acl.c:1593: warning: passing argument 4 of 'dav_new_error' makes integer from pointer without a cast
/usr/include/httpd/mod_dav.h:139: note: expected 'apr_status_t' but argument is of type 'char *'
dav_acl.c:1593: error: too few arguments to function 'dav_new_error'
dav_acl.c:1616: warning: passing argument 4 of 'dav_new_error' makes integer from pointer without a cast
/usr/include/httpd/mod_dav.h:139: note: expected 'apr_status_t' but argument is of type 'char *'
dav_acl.c:1616: error: too few arguments to function 'dav_new_error'
dav_acl.c:1627: warning: passing argument 4 of 'dav_new_error' makes integer from pointer without a cast
/usr/include/httpd/mod_dav.h:139: note: expected 'apr_status_t' but argument is of type 'char *'
dav_acl.c:1627: error: too few arguments to function 'dav_new_error'
make[2]: *** [libdavacl_la-dav_acl.lo] Error 1
make[2]: Leaving directory `/home/minfrin/rpmbuild/BUILD/mod_dav_acl-0.2.0/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/minfrin/rpmbuild/BUILD/mod_dav_acl-0.2.0'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.tVOXfR (%build)