From e5acdb1b39fa7d97d7153741202709e078b463a6 Mon Sep 17 00:00:00 2001 From: Denis Kozadaev Date: Sun, 14 May 2023 12:34:44 +0300 Subject: Add SunOS specific patches Signed-off-by: Denis Kozadaev --- tdecore/CMakeLists.txt | 2 +- tdecore/kdebug.cpp | 8 +++++++- tdecore/kmountpoint.cpp | 1 + tdecore/ksimpledirwatch.cpp | 6 ++++++ tdecore/tdesycoca.cpp | 2 +- 5 files changed, 16 insertions(+), 3 deletions(-) (limited to 'tdecore') diff --git a/tdecore/CMakeLists.txt b/tdecore/CMakeLists.txt index 22c3bbc88..c794a8039 100644 --- a/tdecore/CMakeLists.txt +++ b/tdecore/CMakeLists.txt @@ -141,7 +141,7 @@ tde_add_library( ${target} SHARED AUTOMOC SOURCES ${${target}_SRCS} VERSION 14.1.0 EMBED tdecorenetwork-static - LINK DCOP-shared tdefx-shared ICE SM ${ZLIB_LIBRARIES} + LINK DCOP-shared tdefx-shared ICE SM ${ZLIB_LIBRARIES} ${RESOLV_LIBRARIES} LINK_PRIVATE ltdlc-static ${KDESVGICONS} ${XCOMPOSITE_LIBRARIES} ${LIBIDN_LIBRARIES} ${LIBBFD_LIBRARIES} ${LIB_UTIL} ${GAMIN_LIBRARIES} ${Backtrace_LIBRARY} diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp index afd925190..78fc06247 100644 --- a/tdecore/kdebug.cpp +++ b/tdecore/kdebug.cpp @@ -759,7 +759,13 @@ TQString formatBacktrace(void *addr) { // NOTE: if somebody would compile for some non-linux-glibc platform // check if dladdr function is avalible there Dl_info info; - dladdr(func.addr, &info); // obtain information about the function. + + // obtain information about the function. +#ifdef Q_OS_SOLARIS + dladdr((void *)func.addr, &info); +#else + dladdr(func.addr, &info); +#endif /* Solaris */ func.fileName = info.dli_fname; func.base = info.dli_fbase; diff --git a/tdecore/kmountpoint.cpp b/tdecore/kmountpoint.cpp index a9be89e76..ae698c2af 100644 --- a/tdecore/kmountpoint.cpp +++ b/tdecore/kmountpoint.cpp @@ -33,6 +33,7 @@ #include #endif #ifdef HAVE_SYS_MNTTAB_H +#include #include #endif #ifdef HAVE_MNTENT_H diff --git a/tdecore/ksimpledirwatch.cpp b/tdecore/ksimpledirwatch.cpp index cbb4ce682..a5bab80ce 100644 --- a/tdecore/ksimpledirwatch.cpp +++ b/tdecore/ksimpledirwatch.cpp @@ -52,11 +52,17 @@ // debug #include +#ifdef Q_OS_SOLARIS +#include /* FIONREAD is defined here */ +#endif /* solaris */ + #ifdef HAVE_INOTIFY #include #include #include +#ifdef Q_OS_LINUX #include +#endif /* Linux */ // Linux kernel headers are documented to not compile #define _S390_BITOPS_H #include diff --git a/tdecore/tdesycoca.cpp b/tdecore/tdesycoca.cpp index a11175117..c109d5ff4 100644 --- a/tdecore/tdesycoca.cpp +++ b/tdecore/tdesycoca.cpp @@ -42,7 +42,7 @@ #include #endif -#ifdef Q_OS_SOLARIS +#if defined(Q_OS_SOLARIS) && !defined(__dilos__) extern "C" { extern int madvise(caddr_t, size_t, int); -- cgit v1.2.1