Use cmake to check if we're on DragonFly BSD instead of __DragonFly__

builds on dragonfly 3.4-RELEASE DragonFly
(cherry picked from commit 08fb406533)
This commit is contained in:
Kurt Hindenburg
2013-09-13 23:45:34 -04:00
parent 69479c2176
commit 2fa8435aa1
3 changed files with 12 additions and 2 deletions

View File

@@ -22,6 +22,13 @@ else()
set(ENABLE_DETACHING 1)
endif()
### Handle DragonFlyBSD here instead of using __DragonFly__
IF(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
set(HAVE_OS_DRAGONFLYBSD 1)
else()
set(HAVE_OS_DRAGONFLYBSD 0)
endif()
include(CheckIncludeFiles)
configure_file(config-konsole.h.cmake

View File

@@ -635,7 +635,7 @@ private:
return false;
}
#if defined(__DragonFly__)
#if defined(HAVE_OS_DRAGONFLYBSD)
setName(kInfoProc->kp_comm);
setPid(kInfoProc->kp_pid);
setParentPid(kInfoProc->kp_ppid);
@@ -685,7 +685,7 @@ private:
}
virtual bool readCurrentDir(int aPid) {
#if defined(__DragonFly__)
#if defined(HAVE_OS_DRAGONFLYBSD)
char buf[PATH_MAX];
int managementInfoBase[4];
size_t len;

View File

@@ -3,3 +3,6 @@
/* Defined if you want detaching enabled */
#cmakedefine ENABLE_DETACHING 1
/* Defined if on DragonFly BSD */
#cmakedefine HAVE_OS_DRAGONFLYBSD 1