trying to build 1.6.0 on openbsd (Jul 9 snapshot) and get the warnings below. removed -Werror from util/src/Makefile to complete the build.
the scandir() prototype is: int scandir(const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*compar)(const void *, const void *)); I can eliminate the scandir() warnings with a dumb test diff included below. /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -D_LARGEFILE64_SOURCE -ansi -Wall -Werror -Wno-implicit-function-declaration -D_GNU_SOURCE -DAXIS2_TRACE -MT dir_handler.lo -MD -MP -MF .deps/dir_handler.Tpo -c -o dir_handler.lo dir_handler.c gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -D_LARGEFILE64_SOURCE -ansi -Wall -Werror -Wno-implicit-function-declaration -D_GNU_SOURCE -DAXIS2_TRACE -MT dir_handler.lo -MD -MP -MF .deps/dir_handler.Tpo -c dir_handler.c -fPIC -DPIC -o .libs/dir_handler.o dir_handler.c: In function `axutil_dir_handler_list_services_or_modules_in_dir': dir_handler.c:72: warning: passing arg 3 of `scandir' from incompatible pointer type dir_handler.c: In function `axutil_dir_handler_list_service_or_module_dirs': dir_handler.c:204: warning: array size (500) is smaller than minimum required (1024) dir_handler.c:213: warning: passing arg 3 of `scandir' from incompatible pointer type *** Error code 1 Stop in /usr/local/src/axis2c/axis2c-src-1.6.0/util/src (line 386 of Makefile). *** Error code 1 Stop in /usr/local/src/axis2c/axis2c-src-1.6.0/util/src (line 427 of Makefile). *** Error code 1 Stop in /usr/local/src/axis2c/axis2c-src-1.6.0/util (line 358 of Makefile). *** Error code 1 Stop in /usr/local/src/axis2c/axis2c-src-1.6.0/util (line 215 of Makefile). *** Error code 1 Stop in /usr/local/src/axis2c/axis2c-src-1.6.0 (line 435 of Makefile). *** Error code 1 Stop in /usr/local/src/axis2c/axis2c-src-1.6.0 (line 239 of Makefile). $ gcc -v Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd4.6/3.3.5/specs Configured with: Thread model: single gcc version 3.3.5 (propolice) --- ../axis2c-src-1.6.0.orig/util/src/dir_handler.c Sun Apr 5 21:49:04 2009 +++ util/src/dir_handler.c Mon Aug 24 09:38:19 2009 @@ -28,6 +28,7 @@ #include <minizip/axis2_archive_extract.h> #endif +#define IS_MACOSX extern int AXIS2_ALPHASORT( ); @@ -35,7 +36,7 @@ int dir_select( struct dirent *entry); int file_select( - const struct dirent *entry); + struct dirent *entry); #else int dir_select( const struct dirent *entry); @@ -321,16 +322,12 @@ } -int -file_select( - const struct dirent *entry) +#ifdef IS_MACOSX +int file_select(struct dirent *entry) +#else +int file_select(const struct dirent *entry) +#endif { - - #ifdef IS_MACOSX - int file_select(struct dirent *entry); - #else - int file_select(const struct dirent *entry); - #endif /** FIXME: * This block of code has been sitting here doing nothing. * I have made the existing logic use this code portion.