summaryrefslogtreecommitdiff
path: root/odb-tests/pgsql/bulk/driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb-tests/pgsql/bulk/driver.cxx')
-rw-r--r--odb-tests/pgsql/bulk/driver.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/odb-tests/pgsql/bulk/driver.cxx b/odb-tests/pgsql/bulk/driver.cxx
index ba25542..6b30073 100644
--- a/odb-tests/pgsql/bulk/driver.cxx
+++ b/odb-tests/pgsql/bulk/driver.cxx
@@ -12,10 +12,12 @@
#include <stddef.h>
#include <sys/select.h>
-// Note: hack.
+// Note: hack (also, some platforms, like Mac OS, provide it).
//
#include <arpa/inet.h>
-#define htonll(x) ((((long long)htonl(x)) << 32) + htonl((x) >> 32))
+#ifndef htonll
+# define htonll(x) ((((long long)htonl(x)) << 32) + htonl((x) >> 32))
+#endif
#undef NDEBUG
#include <assert.h>