diff mbox series

shell: Group readdir64/dirent64 with open64

Message ID 20200722035847.GA23478@gondor.apana.org.au (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series shell: Group readdir64/dirent64 with open64 | expand

Commit Message

Herbert Xu July 22, 2020, 3:58 a.m. UTC
Martijn Dekker <martijn@inlv.org> 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 <martijn@inlv.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Comments

Martijn Dekker July 22, 2020, 4:47 a.m. UTC | #1
Op 22-07-20 om 04:58 schreef Herbert Xu:
> Thanks for the report, does this patch help?

Yup, all fixed. Thanks.

- M.
diff mbox series

Patch

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.