aboutsummaryrefslogtreecommitdiff
path: root/src/c.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c.c')
-rw-r--r--src/c.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/c.c b/src/c.c
index d9048a9..7075f42 100644
--- a/src/c.c
+++ b/src/c.c
@@ -1,6 +1,11 @@
#include <sys/stat.h>
#include <dirent.h>
+#ifdef __APPLE__
+DIR * opendir$INODE64( const char * dirName );
+struct dirent * readdir$INODE64( DIR * dir );
+#endif
+
int c_is_dir(const char *path)
{
struct stat m;
@@ -12,3 +17,25 @@ const char *get_d_name(struct dirent *d)
{
return (const char *) d->d_name;
}
+
+
+
+DIR *c_opendir(const char *dirname){
+
+#ifdef __APPLE__
+ return opendir$INODE64(dirname);
+#else
+ return opendir(dirname);
+#endif
+
+}
+
+struct dirent *c_readdir(DIR *dirp){
+
+#ifdef __APPLE__
+ return readdir$INODE64(dirp);
+#else
+ return readdir(dirp);
+#endif
+
+} \ No newline at end of file