summaryrefslogtreecommitdiff
path: root/odb-tests/pgsql/bulk/driver.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-04-24 08:12:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-04-24 08:12:25 +0200
commitdd0833229e84999029e82f4f1e01ec015335f4d3 (patch)
tree1f22ff33864f679b83a4084daf55cbed28199edb /odb-tests/pgsql/bulk/driver.cxx
parent430d1036e57ac7ce502079e245a01e3969c9e300 (diff)
Fix various warnings (uninitialized, loss of precision, macro redefinition)
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>