Module: kamailio Branch: 4.3 Commit: 20b4c9e6294bca137d788dd0c1750f320d3e8461 URL: https://github.com/kamailio/kamailio/commit/20b4c9e6294bca137d788dd0c1750f32...
Author: Daniel Rus Morales danirus@eml.cc Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2015-11-23T16:25:58+01:00
db_postgress: fix compilation, NTOHLL and NTOHLL provided by OSX 10.10
(cherry picked from commit b37aa66fd1cf3fe99aae50adb89d4cfecf6d90d1)
---
Modified: modules/db_postgres/pg_fld.c
---
Diff: https://github.com/kamailio/kamailio/commit/20b4c9e6294bca137d788dd0c1750f32... Patch: https://github.com/kamailio/kamailio/commit/20b4c9e6294bca137d788dd0c1750f32...
---
diff --git a/modules/db_postgres/pg_fld.c b/modules/db_postgres/pg_fld.c index 46d54f0..de62c14 100644 --- a/modules/db_postgres/pg_fld.c +++ b/modules/db_postgres/pg_fld.c @@ -93,19 +93,23 @@ union ull { uint32_t ui32[2]; };
+#if !defined(__OS_darwin) || (defined(__OS_darwin) && !defined(NTOHLL)) static inline uint64_t htonll(uint64_t in) { union ull* p = (union ull*)∈ return ((uint64_t)htonl(p->ui32[0]) << 32) + (uint64_t)htonl(p->ui32[1]); } +#endif
+#if !defined(__OS_darwin) || (defined(__OS_darwin) && !defined(NTOHLL)) static inline uint64_t ntohll(uint64_t in) { union ull* p = (union ull*)∈ return ((uint64_t)ntohl(p->ui32[0]) << 32) + (uint64_t)ntohl(p->ui32[1]); } +#endif
static inline void db_int2pg_int4(struct pg_params* dst, int i,