mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-01 20:52:05 -04:00
patch from Stefan Sperling to allow compilation on OpenBSD
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6613 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5bf1ce8f07
commit
1554e17f48
6 changed files with 62 additions and 3 deletions
|
@ -93,6 +93,12 @@ freebsd-* {
|
||||||
DESTDIR = lib
|
DESTDIR = lib
|
||||||
}
|
}
|
||||||
|
|
||||||
|
################################# OpenBSD ##########################################
|
||||||
|
|
||||||
|
openbsd-* {
|
||||||
|
DESTDIR = lib
|
||||||
|
}
|
||||||
|
|
||||||
################################### COMMON stuff ##################################
|
################################### COMMON stuff ##################################
|
||||||
################################### COMMON stuff ##################################
|
################################### COMMON stuff ##################################
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,8 @@ static bool auto_seed = bdRandom::seed( (time(NULL) + ((uint32_t) pthread_self()
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
// since this is completely insecure anyway, just kludge for now
|
// since this is completely insecure anyway, just kludge for now
|
||||||
static bool auto_seed = bdRandom::seed(time(NULL));
|
static bool auto_seed = bdRandom::seed(time(NULL));
|
||||||
|
#elif defined(__OpenBSD__)
|
||||||
|
static bool auto_seed = bdRandom::seed(arc4random());
|
||||||
#else
|
#else
|
||||||
static bool auto_seed = bdRandom::seed( (time(NULL) + pthread_self()*0x1293fe + (getpid()^0x113ef76b))^0x18e34a12 ) ;
|
static bool auto_seed = bdRandom::seed( (time(NULL) + pthread_self()*0x1293fe + (getpid()^0x113ef76b))^0x18e34a12 ) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -286,6 +286,22 @@ freebsd-* {
|
||||||
DESTDIR = lib
|
DESTDIR = lib
|
||||||
}
|
}
|
||||||
|
|
||||||
|
################################# OpenBSD ##########################################
|
||||||
|
|
||||||
|
openbsd-* {
|
||||||
|
INCLUDEPATH *= /usr/local/include
|
||||||
|
INCLUDEPATH += $$system(pkg-config --cflags glib-2.0 | sed -e "s/-I//g")
|
||||||
|
|
||||||
|
OPENPGPSDK_DIR = ../../openpgpsdk/src
|
||||||
|
INCLUDEPATH *= $${OPENPGPSDK_DIR} ../openpgpsdk
|
||||||
|
|
||||||
|
QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen
|
||||||
|
|
||||||
|
CONFIG += upnp_libupnp
|
||||||
|
|
||||||
|
DESTDIR = lib
|
||||||
|
}
|
||||||
|
|
||||||
################################### COMMON stuff ##################################
|
################################### COMMON stuff ##################################
|
||||||
|
|
||||||
HEADERS += dbase/cachestrapper.h \
|
HEADERS += dbase/cachestrapper.h \
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "rsloginhandler.h"
|
#include "rsloginhandler.h"
|
||||||
#include "util/rsdir.h"
|
#include "util/rsdir.h"
|
||||||
|
|
||||||
#if defined(UBUNTU) || defined(__FreeBSD__)
|
#if defined(UBUNTU) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||||
#include <gnome-keyring-1/gnome-keyring.h>
|
#include <gnome-keyring-1/gnome-keyring.h>
|
||||||
|
|
||||||
GnomeKeyringPasswordSchema my_schema = {
|
GnomeKeyringPasswordSchema my_schema = {
|
||||||
|
@ -119,7 +119,7 @@ bool RsLoginHandler::tryAutoLogin(const std::string& ssl_id,std::string& ssl_pas
|
||||||
|
|
||||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
#ifndef WINDOWS_SYS /* UNIX */
|
#ifndef WINDOWS_SYS /* UNIX */
|
||||||
#if defined(UBUNTU) || defined(__FreeBSD__)
|
#if defined(UBUNTU) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||||
|
|
||||||
gchar *passwd = NULL;
|
gchar *passwd = NULL;
|
||||||
|
|
||||||
|
@ -361,7 +361,7 @@ bool RsLoginHandler::enableAutoLogin(const std::string& ssl_id,const std::string
|
||||||
|
|
||||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
#ifndef WINDOWS_SYS /* UNIX */
|
#ifndef WINDOWS_SYS /* UNIX */
|
||||||
#if defined(UBUNTU) || defined(__FreeBSD__)
|
#if defined(UBUNTU) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||||
if(GNOME_KEYRING_RESULT_OK == gnome_keyring_store_password_sync(&my_schema, NULL, (gchar*)("RetroShare password for SSL Id "+ssl_id).c_str(),(gchar*)ssl_passwd.c_str(),"RetroShare SSL Id",ssl_id.c_str(),NULL))
|
if(GNOME_KEYRING_RESULT_OK == gnome_keyring_store_password_sync(&my_schema, NULL, (gchar*)("RetroShare password for SSL Id "+ssl_id).c_str(),(gchar*)ssl_passwd.c_str(),"RetroShare SSL Id",ssl_id.c_str(),NULL))
|
||||||
{
|
{
|
||||||
std::cerr << "Stored passwd " << "************************" << " into gnome keyring" << std::endl;
|
std::cerr << "Stored passwd " << "************************" << " into gnome keyring" << std::endl;
|
||||||
|
|
|
@ -92,3 +92,12 @@ win32 {
|
||||||
|
|
||||||
LIBS += -lcurl -lxml2 -lxslt -lws2_32 -lwldap32
|
LIBS += -lcurl -lxml2 -lxslt -lws2_32 -lwldap32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
openbsd-* {
|
||||||
|
LIBXML2_DIR = /usr/local/include/libxml2
|
||||||
|
|
||||||
|
INCLUDEPATH += $${LIBXML2_DIR}
|
||||||
|
|
||||||
|
LIBS += -lcurl -lxml2 -lxslt
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -222,6 +222,32 @@ freebsd-* {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##################################### OpenBSD ######################################
|
||||||
|
|
||||||
|
openbsd-* {
|
||||||
|
INCLUDEPATH *= /usr/local/include
|
||||||
|
|
||||||
|
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
|
||||||
|
PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a
|
||||||
|
|
||||||
|
LIBS *= ../../libretroshare/src/lib/libretroshare.a
|
||||||
|
LIBS *= ../../openpgpsdk/src/lib/libops.a -lbz2
|
||||||
|
LIBS *= -lssl -lcrypto
|
||||||
|
LIBS *= -lgpgme
|
||||||
|
LIBS *= -lupnp
|
||||||
|
LIBS *= -lgnome-keyring
|
||||||
|
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
|
||||||
|
|
||||||
|
gxs {
|
||||||
|
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
||||||
|
LIBS += -lsqlite3
|
||||||
|
}
|
||||||
|
|
||||||
|
LIBS *= -rdynamic
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
############################## Common stuff ######################################
|
############################## Common stuff ######################################
|
||||||
|
|
||||||
# On Linux systems that alredy have libssl and libcrypto it is advisable
|
# On Linux systems that alredy have libssl and libcrypto it is advisable
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue