فهرست منبع

db_postgress: fix compilation, NTOHLL and NTOHLL provided by OSX 10.10

Daniel Rus Morales 9 سال پیش
والد
کامیت
b37aa66fd1
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      modules/db_postgres/pg_fld.c

+ 4 - 0
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*)&in;
 	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,