From patchwork Wed Jul 22 03:58:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herbert Xu X-Patchwork-Id: 11677229 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9098113A4 for ; Wed, 22 Jul 2020 03:58:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 817A220792 for ; Wed, 22 Jul 2020 03:58:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731878AbgGVD6v (ORCPT ); Tue, 21 Jul 2020 23:58:51 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:58890 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731857AbgGVD6v (ORCPT ); Tue, 21 Jul 2020 23:58:51 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1jy5u3-00005A-PL; Wed, 22 Jul 2020 13:58:48 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Wed, 22 Jul 2020 13:58:47 +1000 Date: Wed, 22 Jul 2020 13:58:47 +1000 From: Herbert Xu To: Martijn Dekker Cc: dash@vger.kernel.org Subject: [PATCH] shell: Group readdir64/dirent64 with open64 Message-ID: <20200722035847.GA23478@gondor.apana.org.au> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Newsgroups: apana.lists.os.linux.dash User-Agent: Mutt/1.10.1 (2018-07-13) Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org Martijn Dekker wrote: > This commit introduced the build failure: > 3e3e7af1a49273a5e49d50565b3b079a2ab19142 > > The first error is: > expand.c:1365:9: error: incomplete definition of type 'struct dirent64' > if (dp->d_name[0] == '.' && ! matchdot) > ~~^ Thanks for the report, does this patch help? ---8<--- The test for open64 is separate from stat64 for macOS. However, the newly introduced tests for readdir64/dirent64 should be grouped with open64 instead of stat64 as otherwise they cause similar build failures. Reported-by: Martijn Dekker Signed-off-by: Herbert Xu diff --git a/configure.ac b/configure.ac index 955e2bb..ab3c02e 100644 --- a/configure.ac +++ b/configure.ac @@ -145,10 +145,6 @@ AC_CHECK_FUNC(stat64,, [ AC_DEFINE(fstat64, fstat, [64-bit operations are the same as 32-bit]) AC_DEFINE(lstat64, lstat, [64-bit operations are the same as 32-bit]) AC_DEFINE(stat64, stat, [64-bit operations are the same as 32-bit]) - AC_DEFINE(readdir64, readdir, - [64-bit operations are the same as 32-bit]) - AC_DEFINE(dirent64, dirent, - [64-bit operations are the same as 32-bit]) ]) AC_CHECK_FUNC(glob64,, [ @@ -161,6 +157,10 @@ AC_CHECK_FUNC(glob64,, [ dnl OS X apparently has stat64 but not open64. AC_CHECK_FUNC(open64,, [ AC_DEFINE(open64, open, [64-bit operations are the same as 32-bit]) + AC_DEFINE(readdir64, readdir, + [64-bit operations are the same as 32-bit]) + AC_DEFINE(dirent64, dirent, + [64-bit operations are the same as 32-bit]) ]) dnl Check if struct stat has st_mtim.