diff --git a/backends/libpurple/main.cpp b/backends/libpurple/main.cpp index 182e21c2dad20260a1a1d828e6ff0cf73dec1a42..c5c85adb6d8b8da377921bd754d44b678631e3c0 100644 --- a/backends/libpurple/main.cpp +++ b/backends/libpurple/main.cpp @@ -17,7 +17,7 @@ #include "geventloop.h" // #include "valgrind/memcheck.h" -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__APPLE__) #include "malloc.h" #endif #include @@ -417,7 +417,7 @@ class SpectrumNetworkPlugin : public NetworkPlugin { purple_accounts_delete_wrapped(account); #ifndef WIN32 -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__APPLE__) malloc_trim(0); #endif #endif @@ -1583,7 +1583,7 @@ 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__ +#if !defined(__FreeBSD__) && !defined(__APPLE__) // force returning of memory chunks allocated by libxml2 to kernel malloc_trim(0); #endif @@ -1782,7 +1782,7 @@ static void transportDataReceived(gpointer data, gint source, PurpleInputConditi int main(int argc, char **argv) { #ifndef WIN32 -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__APPLE__) mallopt(M_CHECK_ACTION, 2); mallopt(M_PERTURB, 0xb); #endif diff --git a/backends/libyahoo2/yahoo/crypt.c b/backends/libyahoo2/yahoo/crypt.c index 9e215d8ae1d61f4ff88455e7bfbe57d04f5cadc6..1483ac46a20ff1cd9bb7f0c6f46a460b770095e4 100644 --- a/backends/libyahoo2/yahoo/crypt.c +++ b/backends/libyahoo2/yahoo/crypt.c @@ -23,7 +23,11 @@ * freebsd, crypt works properly on those systems. i hate solaris */ #if HAVE_CONFIG_H -# include +# include +#endif + +#ifdef __APPLE__ +#define HAVE_STRING_H 1 #endif #if HAVE_STRING_H diff --git a/backends/libyahoo2/yahoo/libyahoo2.c b/backends/libyahoo2/yahoo/libyahoo2.c index f33f1365dd7b99409e8b9f0f06db431cd9c307d0..46b487cc349279c63a2eed45d25e2b6aa6a85b02 100644 --- a/backends/libyahoo2/yahoo/libyahoo2.c +++ b/backends/libyahoo2/yahoo/libyahoo2.c @@ -51,6 +51,10 @@ # include #endif +#if __APPLE__ +#define STDC_HEADERS 1 +#endif + #if HAVE_UNISTD_H #include #endif diff --git a/backends/libyahoo2/yahoo/yahoo_util.c b/backends/libyahoo2/yahoo/yahoo_util.c index add6d81abc65ec933c3df466a1f99192a5c3107d..92e8d31e95d4a07836e8888f759cb129c29b9fcb 100644 --- a/backends/libyahoo2/yahoo/yahoo_util.c +++ b/backends/libyahoo2/yahoo/yahoo_util.c @@ -23,6 +23,10 @@ # include #endif +#if __APPLE__ +#define STDC_HEADERS 1 +#endif + #if STDC_HEADERS # include #else diff --git a/backends/libyahoo2/yahoo/yahoo_util.h b/backends/libyahoo2/yahoo/yahoo_util.h index cc92486740b1613be47ffe566d7a6bdb802c4a6a..03efd716e4a54a57214bbd2325fa1aee92aca908 100644 --- a/backends/libyahoo2/yahoo/yahoo_util.h +++ b/backends/libyahoo2/yahoo/yahoo_util.h @@ -64,7 +64,7 @@ void *y_memdup(const void *addr, int n); char **y_strsplit(char *str, char *sep, int nelem); void y_strfreev(char **vector); -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(__APPLE__) int strncasecmp(const char *s1, const char *s2, size_t n); int strcasecmp(const char *s1, const char *s2);