On Mon, Apr 23, 2018 at 01:20:51PM -0700, [email protected] wrote: > I am building php on arm and have run into this: > > > > /usr/bin/libtool --silent --mode=compile cc -pthread -O2 -pipe > -DHAVE_CONFIG_H -D_POSIX_THREADS -DAPR_POOL_DEBUG=1 -I./include > -I/usr/ports/pobj/apr-1.6.3/apr-1.6.3/include/arch/unix > -I./include/arch/unix > -I/usr/ports/pobj/apr-1.6.3/apr-1.6.3/include/arch/unix > -I/usr/ports/pobj/apr-1.6.3/apr-1.6.3/include > -I/usr/ports/pobj/apr-1.6.3/apr-1.6.3/include/private > -I/usr/ports/pobj/apr-1.6.3/apr-1.6.3/include/private -o > network_io/unix/sendrecv.lo -c network_io/unix/sendrecv.c && touch > network_io/unix/sendrecv.lo > > network_io/unix/sendrecv.c:181:23: warning: implicit declaration of function > '_Offsetof' is invalid in > > C99 [-Wimplicit-function-declaration] > > if (from->salen > APR_OFFSETOF(struct sockaddr_in, sin_port)) { > > ^ >
It seems this package has been failing on arm for a while. Does this fix the port on arm? Index: Makefile =================================================================== RCS file: /cvs/ports/devel/apr/Makefile,v retrieving revision 1.42 diff -u -p -r1.42 Makefile --- Makefile 25 Oct 2017 19:36:46 -0000 1.42 +++ Makefile 23 Apr 2018 20:43:08 -0000 @@ -4,7 +4,7 @@ COMMENT= Apache Portable Runtime V= 1.6.3 DISTNAME= apr-$V -REVISION= 0 +REVISION= 1 SHARED_LIBS += apr-1 6.0 # .6.2 CATEGORIES= devel Index: patches/patch-include_apr_general_h =================================================================== RCS file: patches/patch-include_apr_general_h diff -N patches/patch-include_apr_general_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-include_apr_general_h 23 Apr 2018 20:42:50 -0000 @@ -0,0 +1,15 @@ +$OpenBSD$ +fix build failure on arm: +implicit declaration of function '_Offsetof' is invalid in C99 +Index: include/apr_general.h +--- include/apr_general.h.orig ++++ include/apr_general.h +@@ -76,7 +76,7 @@ typedef int apr_signum_t; + * @return offset + */ + +-#if defined(CRAY) || (defined(__arm) && !(defined(LINUX) || defined(__FreeBSD__))) ++#if defined(CRAY) || (defined(__arm) && !(defined(LINUX) || defined(__FreeBSD__) || defined(__OpenBSD__))) + #ifdef __STDC__ + #define APR_OFFSET(p_type,field) _Offsetof(p_type,field) + #else
