[PATCH] shell: Group readdir64/dirent64 with open64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martijn Dekker <martijn@xxxxxxxx> 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@xxxxxxxx>
Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

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.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux