xfs
[Top] [All Lists]

[PATCH 07/11] xfsprogs: add nftw64 translation for OS X

To: xfs@xxxxxxxxxxx
Subject: [PATCH 07/11] xfsprogs: add nftw64 translation for OS X
From: Jan Tulak <jtulak@xxxxxxxxxx>
Date: Wed, 26 Aug 2015 14:02:31 +0200
Cc: david@xxxxxxxxxxxxx, hch@xxxxxxxxxxxxx, Jan Tulak <jtulak@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1440590555-20463-1-git-send-email-jtulak@xxxxxxxxxx>
References: <1440590449-20372-1-git-send-email-jtulak@xxxxxxxxxx> <1440590555-20463-1-git-send-email-jtulak@xxxxxxxxxx>
OS X has only nftw variant - not the 64 suffix used in xfs.

Signed-off-by: Jan Tulak <jtulak@xxxxxxxxxx>
---
 include/darwin.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/darwin.h b/include/darwin.h
index 72d9c1d..94e7551 100644
--- a/include/darwin.h
+++ b/include/darwin.h
@@ -163,4 +163,10 @@ platform_discard_blocks(int fd, uint64_t start, uint64_t 
len)
        return 0;
 }
 
+static inline int nftw64(const char *path, int (*fn)(const char *, const 
struct stat *ptr, int flag, struct FTW *), int depth,
+         int flags)
+{
+       return nftw(path, fn, depth, flags);
+}
+
 #endif /* __XFS_DARWIN_H__ */
-- 
2.4.5

<Prev in Thread] Current Thread [Next in Thread>