added some darwin specific includes, allows kraken and the tableconvert
utilities to be built on mac os x.
had to remove '#include <sys/stat.h>' from TableConvert/IndexWriter.cpp,
gave me a weird redefinition error...?

---
 Kraken/DeltaLookup.cpp       |    4 ++++
 Kraken/NcqDevice.h           |    3 +++
 TableConvert/IndexWriter.cpp |    1 -
 TableConvert/IndexWriter.h   |    4 ++++
 4 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/Kraken/DeltaLookup.cpp b/Kraken/DeltaLookup.cpp
index 27cf107..65e48f0 100644
--- a/Kraken/DeltaLookup.cpp
+++ b/Kraken/DeltaLookup.cpp
@@ -8,7 +8,11 @@
 #include <sys/time.h>
 #include <assert.h>
 #include <stdlib.h>
+#if !defined(__APPLE__)
 #include <stropts.h>
+#else 
+#include <unistd.h>
+#endif /* __APPLE__ */
 
 #define READ8()\
     bits = (mBitBuffer>>(mBitCount-8))&0xff;                 \
diff --git a/Kraken/NcqDevice.h b/Kraken/NcqDevice.h
index 03780c9..5bacc3d 100644
--- a/Kraken/NcqDevice.h
+++ b/Kraken/NcqDevice.h
@@ -4,6 +4,9 @@
 #include <stdint.h>
 #include <queue>
 #include <semaphore.h>
+#if defined(__APPLE__)
+#define mmap64          mmap
+#endif /* __APPLE__ */
 
 using namespace std;
 
diff --git a/TableConvert/IndexWriter.cpp b/TableConvert/IndexWriter.cpp
index 064459b..2cb2911 100644
--- a/TableConvert/IndexWriter.cpp
+++ b/TableConvert/IndexWriter.cpp
@@ -1,7 +1,6 @@
 #define _FILE_OFFSET_BITS 64
 
 #include "IndexWriter.h"
-#include <sys/stat.h>
 #include <assert.h>
 #include <string.h>
 
diff --git a/TableConvert/IndexWriter.h b/TableConvert/IndexWriter.h
index 54994cd..2609324 100644
--- a/TableConvert/IndexWriter.h
+++ b/TableConvert/IndexWriter.h
@@ -5,6 +5,10 @@
 #include <string>
 #include <stdio.h>
 
+#if defined(__APPLE__)
+#define fseeko64        fseeko
+#endif /* __APPLE__ */
+
 class IndexWriter : public BaseWriter {
 public:
     IndexWriter(std::string &path, std::string &index, unsigned int
     blockSize);
-- 
1.7.3.1

-- 
  jakob borg
  [email protected]

-- 
http://www.fastmail.fm - Faster than the air-speed velocity of an
                          unladen european swallow

_______________________________________________
A51 mailing list
[email protected]
http://lists.lists.reflextor.com/cgi-bin/mailman/listinfo/a51

Reply via email to