From 7f732f96280b12df0658d835256a141924318584 2012-10-04 12:12:49 From: Jan Kaluza Date: 2012-10-04 12:12:49 Subject: [PATCH] Don't try to set linux only things on bsd --- diff --git a/backends/libpurple/main.cpp b/backends/libpurple/main.cpp index 22b3ee0bb132fff68b62a3a91046db39670b4c32..1c3f8c4850fb089284e030f4b345b405861f22e4 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 17012906507e6f267975403927c667ce46ce0f27..6c8155647f09fde0f2b86b1fd4b937aed9187a03 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})