diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc index 9050d3635..482f74085 100644 --- a/ChangeLog.asciidoc +++ b/ChangeLog.asciidoc @@ -15,6 +15,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] == Version 0.4.4 (under dev) +* core: fix compilation on SmartOS (bug #40981, closes #23) * core: add missing \0 at the end of stderr buffer in hook_process * core: fix highlight problem with "(?-i)" and upper case letters in option weechat.look.highlight (closes #24) diff --git a/src/core/wee-network.c b/src/core/wee-network.c index 1066d2ba9..2eb17cfc9 100644 --- a/src/core/wee-network.c +++ b/src/core/wee-network.c @@ -26,6 +26,13 @@ #include "config.h" #endif +/* _XPG4_2 is needed on SunOS for macros like CMSG_SPACE */ +/* __EXTENSIONS__ is needed on SunOS for constants like NI_MAXHOST */ +#ifdef __sun +#define _XPG4_2 +#define __EXTENSIONS__ +#endif + #include #include #include diff --git a/src/gui/curses/CMakeLists.txt b/src/gui/curses/CMakeLists.txt index a8927bce4..eaba7d481 100644 --- a/src/gui/curses/CMakeLists.txt +++ b/src/gui/curses/CMakeLists.txt @@ -53,6 +53,10 @@ IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") ENDIF(HAVE_BACKTRACE) ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") +IF(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") + LIST(APPEND EXTRA_LIBS "socket" "nsl") +ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") + LIST(APPEND EXTRA_LIBS "pthread") IF(ICONV_LIBRARY) diff --git a/src/gui/curses/gui-curses-term.c b/src/gui/curses/gui-curses-term.c index 2287278b7..c942231f6 100644 --- a/src/gui/curses/gui-curses-term.c +++ b/src/gui/curses/gui-curses-term.c @@ -24,7 +24,11 @@ #endif #ifdef HAVE_NCURSESW_CURSES_H +#ifdef __sun +#include +#else #include +#endif #else #include #endif