Skip to content

Commit 775da27

Browse files
authored
Merge pull request #830 from rahul-bedarkar/build-fix-with-uClibc
add proper check for detecting header <execinfo.h>
2 parents 4b75575 + 1826b35 commit 775da27

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ SET(EXECUTABLE_OUTPUT_PATH "" CACHE INTERNAL
6161
"Where to put the executables for Domoticz"
6262
)
6363

64+
INCLUDE(CheckIncludeFile)
65+
CHECK_INCLUDE_FILE (execinfo.h HAVE_EXECINFO_H)
66+
67+
IF(HAVE_EXECINFO_H)
68+
ADD_DEFINITIONS(-DHAVE_EXECINFO_H)
69+
ENDIF(HAVE_EXECINFO_H)
70+
6471
#set(CMAKE_EXE_LINKER_FLAGS "-static")
6572

6673
# Macro for setting up precompiled headers. Usage:

main/domoticz.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#include <string.h>
4545
#endif
4646

47-
#ifdef __gnu_linux__
47+
#ifdef HAVE_EXECINFO_H
4848
#include <execinfo.h>
4949
static void dumpstack(void) {
5050
// Notes :

0 commit comments

Comments
 (0)