Source
--- utils.c.orig 2009-02-15 13:52:25.000000000 +0100
+++ utils.c 2009-02-15 13:53:35.000000000 +0100
#define _XOPEN_SOURCE 600
#define __USE_XOPEN2K
+#define _DARWIN_C_SOURCE
#include <stdio.h>
#include <stdlib.h>
#ifndef __CHECKER__
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
+#ifdef __APPLE__
+#include <sys/disk.h>
+#else
#include <mntent.h>
+#endif
+
+
#include "kerncompat.h"
#include "radix-tree.h"
#include "ctree.h"
if (!S_ISBLK(st->st_mode)) {
return 0;
}
+#ifdef __APPLE__
+ if (ioctl(fd, DKIOCGETBLOCKCOUNT, &size) >= 0) {
+#else
if (ioctl(fd, BLKGETSIZE64, &size) >= 0) {
+#endif
return size;
}
return 0;
*/
int check_mounted(char *file)
{
+#ifdef __APPLE__
+ return 0;
+#else
struct mntent *mnt;
struct stat st_buf;
dev_t file_dev = 0;
endmntent (f);
return ret;
+#endif
}
struct pending_dir {