Merge pull request #2634 from ryo-on/netbsd-support

Support NetBSD like FreeBSD or Linux.
This commit is contained in:
Daniel Molkentin 2015-01-08 22:35:44 +01:00
commit 4a819026df
2 changed files with 4 additions and 4 deletions

View file

@ -21,11 +21,11 @@ if ( APPLE )
)
endif()
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
list(APPEND OS_SPECIFIC_LINK_LIBRARIES
inotify
)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
if(SPARKLE_FOUND AND NOT BUILD_LIBRARIES_ONLY)
list (APPEND OS_SPECIFIC_LINK_LIBRARIES ${SPARKLE_LIBRARY})

View file

@ -172,7 +172,7 @@ void Utility::setLaunchOnStartup(const QString &appName, const QString& guiName,
qint64 Utility::freeDiskSpace(const QString &path, bool *ok)
{
#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_FREEBSD_KERNEL)
#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_FREEBSD_KERNEL) || defined(Q_OS_NETBSD)
struct statvfs stat;
statvfs(path.toUtf8().data(), &stat);
return (qint64) stat.f_bavail * stat.f_frsize;
@ -370,7 +370,7 @@ bool Utility::isUnix()
bool Utility::isLinux()
{
#ifdef Q_OS_LINUX
#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD)
return true;
#else
return false;