From 80c5b7d90606e35d238b0f854ad3676f30a7030b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sat, 4 Mar 2017 21:31:28 +0100 Subject: [PATCH] Haiku fixes (#3399) * Allow running as root on Haiku. * include unistd.h for ::read and ::write. * Link libnetwork on Haiku. --- include/RemotePlugin.h | 1 + src/CMakeLists.txt | 4 ++++ src/core/main.cpp | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/RemotePlugin.h b/include/RemotePlugin.h index 94ec1625b..d016c5acd 100644 --- a/include/RemotePlugin.h +++ b/include/RemotePlugin.h @@ -94,6 +94,7 @@ typedef int32_t key_t; #ifndef SYNC_WITH_SHM_FIFO #include +#include #endif #endif diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index aee41bfb3..7e6b52234 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -121,6 +121,10 @@ if(LMMS_HAVE_OSS AND LMMS_BUILD_OPENBSD) SET(EXTRA_LIBRARIES "-lossaudio") endif() +IF(LMMS_BUILD_HAIKU) + SET(EXTRA_LIBRARIES "-lnetwork") +ENDIF() + SET(LMMS_REQUIRED_LIBS ${CMAKE_THREAD_LIBS_INIT} ${QT_LIBRARIES} diff --git a/src/core/main.cpp b/src/core/main.cpp index 07f92341d..f7657d9ed 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -251,7 +251,7 @@ int main( int argc, char * * argv ) } } -#ifndef LMMS_BUILD_WIN32 +#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_HAIKU) if ( ( getuid() == 0 || geteuid() == 0 ) && !allowRoot ) { printf( "LMMS cannot be run as root.\nUse \"--allowroot\" to override.\n\n" );