On Mon, Nov 17, 2014 at 01:36:18PM +0000, Stuart Henderson wrote:
> On 2014/11/17 13:28, Landry Breuil wrote:
> > On Mon, Nov 17, 2014 at 12:27:06PM +0100, Jan Klemkow wrote:
> > > Is there still a problem with this port?
> > > Or have I missed something?
> >
> > Yeah, problem is time and developer availability to review and import
> > stuff. I've had a look at it, and it looks ok to import for me... is
> > -Wall required ?
>
> upstream use it, so it seems to make sense to continue using that.
> and because it turns on implicit decl warnings, it points out a problem -
> have you seen the build output?
>
> /usr/include/malloc.h:4:2: warning: #warning "<malloc.h> is obsolete, use
> <stdlib.h>"
> http.c: In function 'catencoded':
> http.c:92: warning: implicit declaration of function 'alloca'
> http.c:92: warning: incompatible implicit declaration of built-in function
> 'alloca'
> http.c: In function 'cathtml':
> http.c:98: warning: incompatible implicit declaration of built-in function
> 'alloca'
> http.c: In function 'cathtmlutf8':
> http.c:112: warning: incompatible implicit declaration of built-in function
> 'alloca'
> http.c: In function 'http_dirlisting':
> http.c:160: warning: implicit declaration of function 'lstat'
> http.c: In function 'buffer_putlogstr':
> http.c:261: warning: incompatible implicit declaration of built-in function
> 'alloca'
> http.c: In function 'proxy_connection':
> http.c:796: warning: incompatible implicit declaration of built-in function
> 'alloca'
> http.c: In function 'proxy_write_header':
> http.c:952: warning: incompatible implicit declaration of built-in function
> 'alloca'
> http.c: In function 'http_dohtaccess':
> http.c:1196: warning: incompatible implicit declaration of built-in function
> 'alloca'
> http.c: In function 'http_openfile':
> http.c:1362: warning: incompatible implicit declaration of built-in function
> 'alloca'
the malloc.h warning can be worked around by using
pre-build:
echo "#include <stdlib.h>" > ${WRKSRC}/havealloca.h
but that doesnt fix the alloca symbol, which should be included in
stdlib.h.. but only with __BSD_VISIBLE. Maybe #define alloca malloc in
havealloca.h at the same time .. that fixes the warning but is a bit of
a hack.
lstat should be here too since sys/stat.h is included, but only if
__BSD_VISIBLE is set too.
dl.c misses <stdio.h> for printf.
> (also someone please kick fefe for that #warning in gatling.c which I haven't
> repeated here but is in very poor taste).
Seconded.
Landry