mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 22:00:09 +02:00
79 lines
3.7 KiB
Plaintext
79 lines
3.7 KiB
Plaintext
From 9a5924ddf324ed11d83cf328363eb5646ae39299 Mon Sep 17 00:00:00 2001
|
||
From: Jerome Duval <jerome.duval@gmail.com>
|
||
Date: Sun, 6 Aug 2017 22:27:54 +0200
|
||
Subject: Haiku patch
|
||
|
||
|
||
diff --git a/Makefile b/Makefile
|
||
index 2805c8a..b14f2c6 100644
|
||
--- a/Makefile
|
||
+++ b/Makefile
|
||
@@ -104,7 +104,7 @@ clean:
|
||
#------------------------------------------------------------------------------
|
||
# make install is validated only for Linux, OSX, Hurd and some BSD targets
|
||
#------------------------------------------------------------------------------
|
||
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly NetBSD MSYS_NT))
|
||
+ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly NetBSD MSYS_NT Haiku))
|
||
|
||
HOST_OS = POSIX
|
||
CMAKE_PARAMS = -DZSTD_BUILD_CONTRIB:BOOL=ON -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON -DZSTD_ZLIB_SUPPORT:BOOL=ON -DZSTD_LZMA_SUPPORT:BOOL=ON
|
||
diff --git a/lib/Makefile b/lib/Makefile
|
||
index cdfdc5c..8459970 100644
|
||
--- a/lib/Makefile
|
||
+++ b/lib/Makefile
|
||
@@ -120,7 +120,7 @@ clean:
|
||
#-----------------------------------------------------------------------------
|
||
# make install is validated only for Linux, OSX, BSD, Hurd and Solaris targets
|
||
#-----------------------------------------------------------------------------
|
||
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS))
|
||
+ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku))
|
||
|
||
DESTDIR ?=
|
||
# directory variables : GNU conventions prefer lowercase
|
||
diff --git a/programs/Makefile b/programs/Makefile
|
||
index cbb67e9..0f4bb6e 100644
|
||
--- a/programs/Makefile
|
||
+++ b/programs/Makefile
|
||
@@ -243,7 +243,7 @@ preview-man: clean-man man
|
||
#-----------------------------------------------------------------------------
|
||
# make install is validated only for Linux, OSX, BSD, Hurd and Solaris targets
|
||
#-----------------------------------------------------------------------------
|
||
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS))
|
||
+ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku))
|
||
|
||
.PHONY: list
|
||
list:
|
||
diff --git a/programs/platform.h b/programs/platform.h
|
||
index a4d7850..bd78b8a 100644
|
||
--- a/programs/platform.h
|
||
+++ b/programs/platform.h
|
||
@@ -70,9 +70,10 @@ extern "C" {
|
||
* PLATFORM_POSIX_VERSION >= 1 is equal to found _POSIX_VERSION
|
||
***************************************************************/
|
||
#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)) /* UNIX-like OS */ \
|
||
- || defined(__midipix__) || defined(__VMS))
|
||
+ || defined(__midipix__) || defined(__VMS) || defined(__HAIKU__))
|
||
# if (defined(__APPLE__) && defined(__MACH__)) || defined(__SVR4) || defined(_AIX) || defined(__hpux) /* POSIX.1–2001 (SUSv3) conformant */ \
|
||
- || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) /* BSD distros */
|
||
+ || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) /* BSD distros */ \
|
||
+ || defined(__HAIKU__)
|
||
# define PLATFORM_POSIX_VERSION 200112L
|
||
# else
|
||
# if defined(__linux__) || defined(__linux)
|
||
diff --git a/programs/util.h b/programs/util.h
|
||
index c8be5f5..0ac585a 100644
|
||
--- a/programs/util.h
|
||
+++ b/programs/util.h
|
||
@@ -65,7 +65,7 @@ extern "C" {
|
||
# include <unistd.h>
|
||
# include <sys/resource.h> /* setpriority */
|
||
# include <time.h> /* clock_t, nanosleep, clock, CLOCKS_PER_SEC */
|
||
-# if defined(PRIO_PROCESS)
|
||
+# if defined(PRIO_PROCESS) && !defined(__HAIKU__)
|
||
# define SET_REALTIME_PRIORITY setpriority(PRIO_PROCESS, 0, -20)
|
||
# else
|
||
# define SET_REALTIME_PRIORITY /* disabled */
|
||
--
|
||
2.14.2
|
||
|