<pre><code>
pg_fld.c:97:40: error: expected ‘)’ before ‘in’
 static inline uint64_t htonll(uint64_t in)
                                        ^
pg_fld.c:107:40: error: expected ‘)’ before ‘in’
 static inline uint64_t ntohll(uint64_t in)
                                        ^
</code></pre>

<p>There is a fairly specific ifdef that doesn't match other platforms that define htonll and ntohll such as Solaris:</p>

<pre><code>#if !defined(__OS_darwin) || (defined(__OS_darwin) && !defined(NTOHLL))
</code></pre>

<p>Would it be acceptable to change these to:</p>

<pre><code>#ifndef htonll
</code></pre>

<p>For example:</p>

<pre><code>diff --git a/modules/db_postgres/pg_fld.c b/modules/db_postgres/pg_fld.c
index de62c14..d9b4911 100644
--- a/modules/db_postgres/pg_fld.c
+++ b/modules/db_postgres/pg_fld.c
@@ -93,7 +93,7 @@ union ull {
        uint32_t ui32[2];
 };

-#if !defined(__OS_darwin) || (defined(__OS_darwin) && !defined(NTOHLL))
+#ifndef htonll
 static inline uint64_t htonll(uint64_t in)
 {
        union ull* p = (union ull*)&in;
@@ -103,7 +103,7 @@ static inline uint64_t htonll(uint64_t in)
 #endif


-#if !defined(__OS_darwin) || (defined(__OS_darwin) && !defined(NTOHLL))
+#ifndef ntohll
 static inline uint64_t ntohll(uint64_t in)
 {
        union ull* p = (union ull*)&in;
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/665">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AF36ZcTF-WhtRufiFJrF-FNTCBQWOmBWks5qKEHagaJpZM4IyLDj">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZWYisBkGYDxD3E-gxOssGp73z3nVks5qKEHagaJpZM4IyLDj.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/665"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>