From a2694eb6d5568abfdcae49d2073e5adaccd8d828 Mon Sep 17 00:00:00 2001 From: wangmeng Date: Fri, 3 Apr 2026 19:33:22 +0800 Subject: [PATCH] =?UTF-8?q?x86=E5=B9=B3=E5=8F=B0=E4=BA=A4=E5=8F=89?= =?UTF-8?q?=E7=BC=96=E8=AF=91linux-arm64-sdk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Agent Change-Id: I0f928e734517cef1a9cdbec7b07e8bdcfc1837d7 Signed-off-by: wangmeng --- include/fts.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/fts.h b/include/fts.h index 03e6745..b62db42 100644 --- a/include/fts.h +++ b/include/fts.h @@ -56,11 +56,12 @@ #define reallocf(ptr, size) (realloc((ptr), (size))) // __size_t is a macro defined in stddef.h, not a type, so we define a new type +// Use __fts_ prefix to avoid conflicts with glibc internal types (__dev_t, __ino_t, __nlink_t) typedef size_t __fts_size_t; -typedef uint64_t __dev_t; +typedef uint64_t __fts_dev_t; #ifndef WITH_FREEBSD -typedef uint64_t __ino_t; -typedef uint64_t __nlink_t; +typedef uint64_t __fts_ino_t; +typedef uint64_t __fts_nlink_t; #endif // // From https://github.com/freebsd/freebsd-src/blob/e81e71b/sys/sys/stat.h @@ -80,7 +81,7 @@ typedef struct { struct _ftsent *fts_cur; /* current node */ struct _ftsent *fts_child; /* linked list of children */ struct _ftsent **fts_array; /* sort array */ - __dev_t fts_dev; /* starting device # */ + __fts_dev_t fts_dev; /* starting device # */ char *fts_path; /* path for this descent */ int fts_rfd; /* fd for root */ __fts_size_t fts_pathlen; /* sizeof(path) */ @@ -122,9 +123,9 @@ typedef struct _ftsent { __fts_size_t fts_pathlen; /* strlen(fts_path) */ __fts_size_t fts_namelen; /* strlen(fts_name) */ - __ino_t fts_ino; /* inode */ - __dev_t fts_dev; /* device */ - __nlink_t fts_nlink; /* link count */ + __fts_ino_t fts_ino; /* inode */ + __fts_dev_t fts_dev; /* device */ + __fts_nlink_t fts_nlink; /* link count */ #define FTS_ROOTPARENTLEVEL -1 #define FTS_ROOTLEVEL 0