From 67b231749b7fdd10bfb4cd7ff6244e4848bfb6a1 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Wed, 22 Oct 2014 21:47:40 +0200
Subject: Preliminary Haiku support.


diff --git a/diskio.h b/diskio.h
index 631a43a..e343cb9 100644
--- a/diskio.h
+++ b/diskio.h
@@ -29,7 +29,7 @@
 #include <sys/dkio.h>
 #endif
 
-#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
+#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) || defined(__HAIKU__)
 #define fstat64 fstat
 #define stat64 stat
 #endif
diff --git a/gptcurses.cc b/gptcurses.cc
index 6002077..4eb8aee 100644
--- a/gptcurses.cc
+++ b/gptcurses.cc
@@ -22,6 +22,7 @@
 #include <iostream>
 #include <string>
 #include <sstream>
+#include <clocale>
 #include <ncurses.h>
 #include "gptcurses.h"
 #include "support.h"
diff --git a/support.h b/support.h
index 7f691c3..b64cb16 100644
--- a/support.h
+++ b/support.h
@@ -10,7 +10,7 @@
 
 #define GPTFDISK_VERSION "0.8.10"
 
-#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
+#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) || defined(__HAIKU__)
 // Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64
 #include <sys/disk.h>
 #define lseek64 lseek
-- 
1.8.3.4

