mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-31 11:54:22 -04:00
Fix El Capitan OSX 10.11 Compil
This commit is contained in:
parent
46dd5be2f2
commit
2db8dbd45f
11 changed files with 502 additions and 448 deletions
|
@ -295,7 +295,7 @@ mac {
|
|||
OBJECTS_DIR = temp/obj
|
||||
MOC_DIR = temp/moc
|
||||
#DEFINES = WINDOWS_SYS WIN32 STATICLIB MINGW
|
||||
DEFINES *= MINIUPNPC_VERSION=13
|
||||
#DEFINES *= MINIUPNPC_VERSION=13
|
||||
|
||||
CONFIG += upnp_miniupnpc
|
||||
CONFIG += c++11
|
||||
|
@ -305,7 +305,7 @@ mac {
|
|||
#CONFIG += zcnatassist
|
||||
|
||||
# Beautiful Hack to fix 64bit file access.
|
||||
QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dfopen64=fopen -Dvstatfs64=vstatfs
|
||||
QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dfopen64=fopen -Dvstatfs64=vstatfs
|
||||
|
||||
#GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
||||
#GPGME_DIR = ../../../../gpgme-1.1.8
|
||||
|
@ -315,6 +315,7 @@ mac {
|
|||
|
||||
DEPENDPATH += . $$INC_DIR
|
||||
INCLUDEPATH += . $$INC_DIR
|
||||
INCLUDEPATH += ../../../.
|
||||
|
||||
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
|
||||
LIBS += /usr/local/lib/libsqlcipher.a
|
||||
|
|
|
@ -30,7 +30,17 @@
|
|||
#include <iostream>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
int __attribute__((weak)) pthread_setname_np(const char *__buf) ;
|
||||
int RS_pthread_setname_np(pthread_t /*__target_thread*/, const char *__buf) {
|
||||
return pthread_setname_np(__buf);
|
||||
}
|
||||
#else
|
||||
int __attribute__((weak)) pthread_setname_np(pthread_t __target_thread, const char *__buf) ;
|
||||
int RS_pthread_setname_np(pthread_t __target_thread, const char *__buf) {
|
||||
return pthread_setname_np(__target_thread, __buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RSMUTEX_DEBUG
|
||||
#include <stdio.h>
|
||||
|
@ -167,19 +177,21 @@ void RsThread::start(const std::string &threadName)
|
|||
// set name
|
||||
|
||||
if(pthread_setname_np)
|
||||
if(!threadName.empty())
|
||||
{
|
||||
// thread names are restricted to 16 characters including the terminating null byte
|
||||
if(threadName.length() > 15)
|
||||
{
|
||||
{
|
||||
if(!threadName.empty())
|
||||
{
|
||||
// thread names are restricted to 16 characters including the terminating null byte
|
||||
if(threadName.length() > 15)
|
||||
{
|
||||
#ifdef DEBUG_THREADS
|
||||
THREAD_DEBUG << "RsThread::start called with to long name '" << name << "' truncating..." << std::endl;
|
||||
THREAD_DEBUG << "RsThread::start called with to long name '" << name << "' truncating..." << std::endl;
|
||||
#endif
|
||||
pthread_setname_np(mTid, threadName.substr(0, 15).c_str());
|
||||
} else {
|
||||
pthread_setname_np(mTid, threadName.c_str());
|
||||
}
|
||||
}
|
||||
RS_pthread_setname_np(mTid, threadName.substr(0, 15).c_str());
|
||||
} else {
|
||||
RS_pthread_setname_np(mTid, threadName.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue