From 7f732f96280b12df0658d835256a141924318584 Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Thu, 4 Oct 2012 12:12:49 +0200 Subject: [PATCH] Don't try to set linux only things on bsd --- backends/libpurple/main.cpp | 4 ++++ src/CMakeLists.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/backends/libpurple/main.cpp b/backends/libpurple/main.cpp index 22b3ee0b..1c3f8c48 100644 --- a/backends/libpurple/main.cpp +++ b/backends/libpurple/main.cpp @@ -1463,8 +1463,10 @@ static void signed_on(PurpleConnection *gc, gpointer unused) { PurpleAccount *account = purple_connection_get_account_wrapped(gc); np->handleConnected(np->m_accounts[account]); #ifndef WIN32 +#ifndef __FreeBSD__ // force returning of memory chunks allocated by libxml2 to kernel malloc_trim(0); +#endif #endif // For prpl-gg @@ -1652,8 +1654,10 @@ static void transportDataReceived(gpointer data, gint source, PurpleInputConditi int main(int argc, char **argv) { #ifndef WIN32 +#ifndef __FreeBSD__ mallopt(M_CHECK_ACTION, 2); mallopt(M_PERTURB, 0xb); +#endif signal(SIGPIPE, SIG_IGN); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 17012906..6c815564 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -38,11 +38,11 @@ else(PROTOBUF_FOUND) ADD_LIBRARY(transport SHARED ${HEADERS} ${SRC} ${SWIFTEN_SRC}) endif(PROTOBUF_FOUND) -if (CMAKE_COMPILER_IS_GNUCXX) +# if (CMAKE_COMPILER_IS_GNUCXX) if (NOT WIN32) ADD_DEFINITIONS(-fPIC) endif() -endif() +# endif() if (WIN32) TARGET_LINK_LIBRARIES(transport transport-plugin sqlite3 ${PQXX_LIBRARY} ${PQ_LIBRARY} ${MYSQL_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES} ${PROTOBUF_LIBRARY})