Merge pull request #110 from sirjenster/newbranchformychanges

First Mac/OSX compile fixes
This commit is contained in:
Cyril Soler 2015-09-22 23:21:14 -04:00
commit 323d894782
3 changed files with 19 additions and 17 deletions

View File

@ -266,18 +266,18 @@ mac {
OBJECTS_DIR = temp/obj OBJECTS_DIR = temp/obj
MOC_DIR = temp/moc MOC_DIR = temp/moc
#DEFINES = WINDOWS_SYS WIN32 STATICLIB MINGW #DEFINES = WINDOWS_SYS WIN32 STATICLIB MINGW
#DEFINES *= MINIUPNPC_VERSION=13 DEFINES *= MINIUPNPC_VERSION=13
CONFIG += upnp_miniupnpc CONFIG += upnp_miniupnpc
# zeroconf disabled at the end of libretroshare.pro (but need the code) # zeroconf disabled at the end of libretroshare.pro (but need the code)
CONFIG += zeroconf #CONFIG += zeroconf
CONFIG += zcnatassist #CONFIG += zcnatassist
# Beautiful Hack to fix 64bit file access. # 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
UPNPC_DIR = ../../../miniupnpc-1.0 UPNPC_DIR = ../../../miniupnpc-1.3
#GPG_ERROR_DIR = ../../../../libgpg-error-1.7 #GPG_ERROR_DIR = ../../../../libgpg-error-1.7
#GPGME_DIR = ../../../../gpgme-1.1.8 #GPGME_DIR = ../../../../gpgme-1.1.8

View File

@ -4,7 +4,6 @@
#include "rsloginhandler.h" #include "rsloginhandler.h"
#include "util/rsdir.h" #include "util/rsdir.h"
#include "rsaccounts.h" #include "rsaccounts.h"
#if defined(UBUNTU) || defined(__FreeBSD__) || defined(__OpenBSD__) #if defined(UBUNTU) || defined(__FreeBSD__) || defined(__OpenBSD__)
#include <gnome-keyring-1/gnome-keyring.h> #include <gnome-keyring-1/gnome-keyring.h>
@ -145,8 +144,9 @@ bool RsLoginHandler::tryAutoLogin(const RsPeerId& ssl_id,std::string& ssl_passwd
void *passwordData = NULL; void *passwordData = NULL;
UInt32 passwordLength = 0; UInt32 passwordLength = 0;
const char *userId = ssl_id.c_str(); std::string idtemp = ssl_id.toStdString();
UInt32 uidLength = strlen(ssl_id.c_str()); const char *userId = idtemp.c_str();
UInt32 uidLength = strlen(userId);
SecKeychainItemRef itemRef = NULL; SecKeychainItemRef itemRef = NULL;
OSStatus status = SecKeychainFindGenericPassword ( OSStatus status = SecKeychainFindGenericPassword (
@ -381,8 +381,9 @@ bool RsLoginHandler::enableAutoLogin(const RsPeerId& ssl_id,const std::string& s
const void *password = ssl_passwd.c_str(); const void *password = ssl_passwd.c_str();
UInt32 passwordLength = strlen(ssl_passwd.c_str()); UInt32 passwordLength = strlen(ssl_passwd.c_str());
const char *userid = ssl_id.c_str(); std::string idtemp = ssl_id.toStdString();
UInt32 uidLength = strlen(ssl_id.c_str()); const char *userid = idtemp.c_str();
UInt32 uidLength = strlen(userid);
OSStatus status = SecKeychainAddGenericPassword ( OSStatus status = SecKeychainAddGenericPassword (
NULL, // default keychain NULL, // default keychain
@ -540,8 +541,9 @@ bool RsLoginHandler::clearAutoLogin(const RsPeerId& ssl_id)
void *passwordData = NULL; void *passwordData = NULL;
UInt32 passwordLength = 0; UInt32 passwordLength = 0;
const char *userId = ssl_id.c_str(); std::string idtemp = ssl_id.toStdString();
UInt32 uidLength = strlen(ssl_id.c_str()); const char *userId = idtemp.c_str();
UInt32 uidLength = strlen(userId);
SecKeychainItemRef itemRef = NULL; SecKeychainItemRef itemRef = NULL;
OSStatus status = SecKeychainFindGenericPassword ( OSStatus status = SecKeychainFindGenericPassword (

View File

@ -210,18 +210,18 @@ win32 {
macx { macx {
# ENABLE THIS OPTION FOR Univeral Binary BUILD. # ENABLE THIS OPTION FOR Univeral Binary BUILD.
CONFIG += ppc x86 #CONFIG += ppc x86
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
CONFIG += version_detail_bash_script CONFIG += version_detail_bash_script
LIBS += -lssl -lcrypto -lz LIBS += -lssl -lcrypto -lz
#LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error -lassuan #LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error -lassuan
LIBS += ../../../miniupnpc-1.0/libminiupnpc.a LIBS += ../../../miniupnpc-1.3/libminiupnpc.a
LIBS += -framework CoreFoundation LIBS += -framework CoreFoundation
LIBS += -framework Security LIBS += -framework Security
LIBS += -framework Carbon
INCLUDEPATH += . INCLUDEPATH += . /usr/local/include
#DEFINES* = MAC_IDLE # for idle feature DEFINES *= MAC_IDLE # for idle feature
CONFIG -= uitools CONFIG -= uitools
} }