summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2014-10-26 00:10:46 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2014-10-26 00:10:46 -0700
commit79e7207a7c4746a21e4762ecb1fb7d75a3628294 (patch)
tree07c78480e5d560d97c0d603520da6d29d3bb7261
parentc44a19de0129e0c7d966a2264b2879e6e050c334 (diff)
Use the "private" 64-bit version of getdirentries.
-rw-r--r--setnsfpn.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/setnsfpn.cpp b/setnsfpn.cpp
index 88dbffd..d51e2e9 100644
--- a/setnsfpn.cpp
+++ b/setnsfpn.cpp
@@ -37,18 +37,7 @@
} \
} _value; })
-int $getdirentries(int, char *, int, long *) __asm("_getdirentries");
-
-struct $dirent {
- __uint32_t d_ino;
- __uint16_t d_reclen;
- __uint8_t d_type;
- __uint8_t d_namlen;
- char d_name[__DARWIN_MAXNAMLEN + 1];
-};
-
-#define getdirentries $getdirentries
-#define dirent $dirent
+extern "C" int __getdirentries64(int, char *, int, long *);
enum Recurse {
RecurseYes,
@@ -106,7 +95,7 @@ static int setnsfpn(const char *path, size_t before, Recurse recurse) {
if (recurse == RecurseYes)
for (long address(0);;) {
char buffer[4096];
- int size(_syscall(getdirentries(fd, buffer, sizeof(buffer), &address)));
+ int size(_syscall(__getdirentries64(fd, buffer, sizeof(buffer), &address)));
if (size == 0)
break;