mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-19 18:20:07 +02:00
45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
From 0adb7c07e094fad72120b8a86fcf386a95f9be06 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
|
Date: Sun, 13 May 2018 17:00:39 +0200
|
|
Subject: Haiku supporting patches
|
|
|
|
|
|
diff --git a/build_detect_platform b/build_detect_platform
|
|
index d2a20ce..e1fa25e 100755
|
|
--- a/build_detect_platform
|
|
+++ b/build_detect_platform
|
|
@@ -131,6 +131,13 @@ case "$TARGET_OS" in
|
|
PORT_FILE=port/port_posix.cc
|
|
PORT_SSE_FILE=port/port_posix_sse.cc
|
|
;;
|
|
+ Haiku)
|
|
+ PLATFORM=OS_HAIKU
|
|
+ COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_HAIKU"
|
|
+ PLATFORM_LIBS="-lpthread"
|
|
+ PORT_FILE=port/port_posix.cc
|
|
+ PORT_SSE_FILE=port/port_posix_sse.cc
|
|
+ ;;
|
|
OS_ANDROID_CROSSCOMPILE)
|
|
PLATFORM=OS_ANDROID
|
|
COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_ANDROID -DLEVELDB_PLATFORM_POSIX"
|
|
diff --git a/util/env_posix.cc b/util/env_posix.cc
|
|
index 84aabb2..58b00ee 100644
|
|
--- a/util/env_posix.cc
|
|
+++ b/util/env_posix.cc
|
|
@@ -280,10 +280,12 @@ class PosixWritableFile : public WritableFile {
|
|
if (!s.ok()) {
|
|
return s;
|
|
}
|
|
+ #ifndef __HAIKU__
|
|
if (fflush_unlocked(file_) != 0 ||
|
|
fdatasync(fileno(file_)) != 0) {
|
|
s = Status::IOError(filename_, strerror(errno));
|
|
}
|
|
+ #endif
|
|
return s;
|
|
}
|
|
};
|
|
--
|
|
2.16.2
|
|
|