You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Dengke Du <de...@windriver.com> on 2016/12/15 01:57:59 UTC
[PATCH] apr: fix off_t size doesn't match in glibc when cross compiling
In configure.in, it contains the following:
APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
the macro "APR_CHECK_SIZEOF_EXTENDED" was defined in build/apr_common.m4,
it use the "AC_TRY_RUN" macro, this macro let the off_t to 8, when cross
compiling enable.
So it was hardcoded for cross compiling, we should detect it dynamic based on
the sysroot's glibc. We change it to the following:
AC_CHECK_SIZEOF(off_t)
Signed-off-by: Dengke Du <de...@windriver.com>
---
configure.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.in b/configure.in
index 9d57ae6..fcc647e 100644
--- a/configure.in
+++ b/configure.in
@@ -1784,7 +1784,7 @@ fi
size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\""
-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
+AC_CHECK_SIZEOF(off_t)
if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
# Enable LFS
--
2.7.4