| Index: ports/apr/nacl.patch
|
| diff --git a/ports/apr/nacl.patch b/ports/apr/nacl.patch
|
| index 94cc09857386fabbe8730fca745d5cf87f4286af..898458463c28112c3ea17965821de71100b7c853 100644
|
| --- a/ports/apr/nacl.patch
|
| +++ b/ports/apr/nacl.patch
|
| @@ -1,5 +1,5 @@
|
| diff --git a/Makefile.in b/Makefile.in
|
| -index 2ccaaf3..3a34445 100644
|
| +index 2ccaaf3..0cdd738 100644
|
| --- a/Makefile.in
|
| +++ b/Makefile.in
|
| @@ -18,7 +18,7 @@ APR_MAJOR_VERSION=@APR_MAJOR_VERSION@
|
| @@ -11,59 +11,46 @@ index 2ccaaf3..3a34445 100644
|
|
|
| #
|
| # Macros for target determination
|
| -@@ -134,7 +134,8 @@ tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
|
| - $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
|
| +@@ -45,8 +45,8 @@ LT_VERSION = @LT_VERSION@
|
| + @INCLUDE_OUTPUTS@
|
|
|
| - include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
|
| + CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
|
| +- build/apr_rules.out tools/gen_test_char@EXEEXT@ \
|
| +- tools/gen_test_char.o tools/gen_test_char.lo \
|
| ++ build/apr_rules.out tools/gen_test_char \
|
| ++ tools/gen_test_char.o \
|
| + include/private/apr_escape_test_char.h
|
| + DISTCLEAN_TARGETS = config.cache config.log config.status \
|
| + include/apr.h include/arch/unix/apr_private.h \
|
| +@@ -129,12 +129,18 @@ check: $(TARGET_LIB)
|
| + etags:
|
| + etags `find . -name '*.[ch]'`
|
| +
|
| +-OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
|
| +-tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
|
| +- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
|
| ++tools/gen_test_char.o: tools/gen_test_char.c
|
| ++ mkdir -p tools
|
| ++ gcc -c $< -o $@
|
| +
|
| +-include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
|
| - tools/gen_test_char@EXEEXT@ > $@
|
| ++
|
| ++OBJECTS_gen_test_char = tools/gen_test_char.o
|
| ++tools/gen_test_char: $(OBJECTS_gen_test_char)
|
| ++ gcc $(OBJECTS_gen_test_char) -o $@
|
| ++
|
| ++include/private/apr_escape_test_char.h: tools/gen_test_char
|
| + mkdir -p include/private
|
| -+ $(RUNPROGRAM) tools/gen_test_char@EXEEXT@ > $@
|
| ++ tools/gen_test_char > $@
|
|
|
| LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LT_LDFLAGS) \
|
| @LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@
|
| diff --git a/configure b/configure
|
| -index 0b5b83a..52be06b 100755
|
| +index 0b5b83a..d7370ca 100755
|
| --- a/configure
|
| +++ b/configure
|
| -@@ -11760,7 +11760,7 @@ irix5* | irix6* | nonstopux*)
|
| - ;;
|
| -
|
| - # This must be glibc/ELF.
|
| --linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
| -+linux* | k*bsd*-gnu | kopensolaris*-gnu | nacl* | nacl*)
|
| - lt_cv_deplibs_check_method=pass_all
|
| - ;;
|
| -
|
| -@@ -16955,6 +16955,28 @@ uts4*)
|
| - shlibpath_var=LD_LIBRARY_PATH
|
| - ;;
|
| -
|
| -+nacl)
|
| -+ if $CC -v 2>&1 | grep -q enable-shared; then
|
| -+ dynamic_linker="GNU/NaCl ld.so"
|
| -+ version_type=linux
|
| -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
|
| -+ soname_spec='${libname}${release}${shared_ext}$major'
|
| -+ else
|
| -+ dynamic_linker=no
|
| -+ fi
|
| -+ ;;
|
| -+
|
| -+nacl)
|
| -+ if $CC -v 2>&1 | grep -q enable-shared; then
|
| -+ dynamic_linker="GNU/NaCl ld.so"
|
| -+ version_type=linux
|
| -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
|
| -+ soname_spec='${libname}${release}${shared_ext}$major'
|
| -+ else
|
| -+ dynamic_linker=no
|
| -+ fi
|
| -+ ;;
|
| -+
|
| - *)
|
| - dynamic_linker=no
|
| - ;;
|
| -@@ -20959,7 +20981,8 @@ if ${ac_cv_file__dev_zero+:} false; then :
|
| +@@ -20959,7 +20959,8 @@ if ${ac_cv_file__dev_zero+:} false; then :
|
| $as_echo_n "(cached) " >&6
|
| else
|
| test "$cross_compiling" = yes &&
|
| @@ -73,7 +60,7 @@ index 0b5b83a..52be06b 100755
|
| if test -r "/dev/zero"; then
|
| ac_cv_file__dev_zero=yes
|
| else
|
| -@@ -23051,7 +23074,8 @@ if ${ac_cv_func_setpgrp_void+:} false; then :
|
| +@@ -23051,7 +23052,8 @@ if ${ac_cv_func_setpgrp_void+:} false; then :
|
| $as_echo_n "(cached) " >&6
|
| else
|
| if test "$cross_compiling" = yes; then :
|
| @@ -83,16 +70,16 @@ index 0b5b83a..52be06b 100755
|
| else
|
| cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
| /* end confdefs.h. */
|
| -@@ -24262,7 +24286,7 @@ if ${ac_cv_sizeof_struct_iovec+:} false; then :
|
| +@@ -24262,7 +24264,7 @@ if ${ac_cv_sizeof_struct_iovec+:} false; then :
|
| $as_echo_n "(cached) " >&6
|
| else
|
| if test "$cross_compiling" = yes; then :
|
| - ac_cv_sizeof_struct_iovec=0
|
| -+ ac_cv_sizeof_struct_iovec=8
|
| ++ ac_cv_sizeof_struct_iovec=1
|
| else
|
| cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
| /* end confdefs.h. */
|
| -@@ -27355,10 +27379,8 @@ if ${apr_cv_tcp_nodelay_with_cork+:} false; then :
|
| +@@ -27355,10 +27357,11 @@ if ${apr_cv_tcp_nodelay_with_cork+:} false; then :
|
| $as_echo_n "(cached) " >&6
|
| else
|
| if test "$cross_compiling" = yes; then :
|
| @@ -101,21 +88,37 @@ index 0b5b83a..52be06b 100755
|
| -as_fn_error $? "cannot run test program while cross compiling
|
| -See \`config.log' for more details" "$LINENO" 5; }
|
| + apr_cv_tcp_nodelay_with_cork=no
|
| -+ #{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; }
|
| ++ #{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
| ++#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
| ++#as_fn_error $? "cannot run test program while cross compiling
|
| ++#See \`config.log' for more details" "$LINENO" 5; }
|
| else
|
| cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
| /* end confdefs.h. */
|
| diff --git a/include/apr.h.in b/include/apr.h.in
|
| -index 0ad7a91..c6372e6 100644
|
| +index 0ad7a91..5f8d86d 100644
|
| --- a/include/apr.h.in
|
| +++ b/include/apr.h.in
|
| @@ -189,6 +189,9 @@
|
| #endif
|
|
|
| /* header files for PATH_MAX, _POSIX_PATH_MAX */
|
| -+#if defined(__native_client__)
|
| ++#if defined(__native_client__) && defined(__GLIBC__)
|
| +#include <linux/limits.h>
|
| +#endif
|
| #if APR_HAVE_LIMITS_H
|
| #include <limits.h>
|
| #else
|
| +diff --git a/network_io/unix/sockopt.c b/network_io/unix/sockopt.c
|
| +index 6ce4b91..15247ed 100644
|
| +--- a/network_io/unix/sockopt.c
|
| ++++ b/network_io/unix/sockopt.c
|
| +@@ -358,7 +358,7 @@ apr_status_t apr_socket_opt_get(apr_socket_t *sock,
|
| +
|
| + apr_status_t apr_socket_atmark(apr_socket_t *sock, int *atmark)
|
| + {
|
| +-#ifndef BEOS_R5
|
| ++#if !defined(BEOS_R5) && (!defined(__native_client__) || defined(__GLIBC__))
|
| + int oobmark;
|
| +
|
| + if (ioctl(sock->socketdes, SIOCATMARK, (void*) &oobmark) < 0)
|
|
|