Haiku fixes (#3399)

* Allow running as root on Haiku.
* include unistd.h for ::read and ::write.
* Link libnetwork on Haiku.
This commit is contained in:
Jérôme Duval
2017-03-04 21:31:28 +01:00
committed by Tres Finocchiaro
parent f7d09c3c69
commit 80c5b7d906
3 changed files with 6 additions and 1 deletions

View File

@@ -94,6 +94,7 @@ typedef int32_t key_t;
#ifndef SYNC_WITH_SHM_FIFO
#include <poll.h>
#include <unistd.h>
#endif
#endif

View File

@@ -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}

View File

@@ -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" );