Fix MacOSX 10.10 Yosemite Compilation

by using retroshare.pri file like linux or windows,
 fixing namespace for unordered_set,
 fixing c++11 for ostream& operator<<,
 checking if ntohll and htonll already defined.
This commit is contained in:
Phenom 2015-12-21 17:25:02 +01:00
parent 8e9fe6d800
commit 86b559191e
11 changed files with 127 additions and 13 deletions

View file

@ -40,6 +40,7 @@
#define BIG_ENDIAN 4321
#endif
#ifndef ntohll
uint64_t ntohll(uint64_t x)
{
#ifdef BYTE_ORDER
@ -61,11 +62,13 @@ uint64_t ntohll(uint64_t x)
#endif
}
#endif
#ifndef htonll
uint64_t htonll(uint64_t x)
{
return ntohll(x);
}
#endif
void sockaddr_clear(struct sockaddr_in *addr)
{

View file

@ -58,8 +58,12 @@ int inet_aton(const char *name, struct in_addr *addr);
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
/* 64 bit conversions */
#ifndef ntohll
uint64_t ntohll(uint64_t x);
#endif
#ifndef htonll
uint64_t htonll(uint64_t x);
#endif
/* blank a network address */
void sockaddr_clear(struct sockaddr_in *addr);