apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dengke Du <dengke...@windriver.com>
Subject [PATCH] apr: fix off_t size doesn't match in glibc when cross compiling
Date Thu, 15 Dec 2016 01:57:59 GMT
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 <dengke.du@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


Mime
View raw message