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:
committed by
Tres Finocchiaro
parent
f7d09c3c69
commit
80c5b7d906
@@ -94,6 +94,7 @@ typedef int32_t key_t;
|
||||
|
||||
#ifndef SYNC_WITH_SHM_FIFO
|
||||
#include <poll.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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" );
|
||||
|
||||
Reference in New Issue
Block a user