Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 51149200BEC for ; Thu, 15 Dec 2016 02:58:22 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4F952160B2E; Thu, 15 Dec 2016 01:58:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 99734160B19 for ; Thu, 15 Dec 2016 02:58:21 +0100 (CET) Received: (qmail 89850 invoked by uid 500); 15 Dec 2016 01:58:20 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 89840 invoked by uid 99); 15 Dec 2016 01:58:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Dec 2016 01:58:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 57857180A48 for ; Thu, 15 Dec 2016 01:58:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -5.299 X-Spam-Level: X-Spam-Status: No, score=-5.299 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-2.999, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id g26K3w83Ky8m for ; Thu, 15 Dec 2016 01:58:18 +0000 (UTC) Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 087A55F54F for ; Thu, 15 Dec 2016 01:58:17 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id uBF1w1Kq029134 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL) for ; Wed, 14 Dec 2016 17:58:01 -0800 (PST) Received: from pek-lpgtest20.wrs.com (128.224.179.28) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.294.0; Wed, 14 Dec 2016 17:58:00 -0800 From: Dengke Du To: Subject: [PATCH] apr: fix off_t size doesn't match in glibc when cross compiling Date: Thu, 15 Dec 2016 09:57:59 +0800 Message-ID: <1481767079-4892-1-git-send-email-dengke.du@windriver.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain archived-at: Thu, 15 Dec 2016 01:58:22 -0000 In configure.in, it contains the following: APR_CHECK_SIZEOF_EXTENDED([#include ], 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 --- 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 ], 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