This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 0eed7c4  fix(c/driver/postgres): fix duplicate symbols; add note about 
PKG_CONFIG_PATH (#169)
0eed7c4 is described below

commit 0eed7c49382cf8a94e73222adf7137c883c31ee7
Author: Dewey Dunnington <[email protected]>
AuthorDate: Wed Nov 9 15:42:53 2022 -0400

    fix(c/driver/postgres): fix duplicate symbols; add note about 
PKG_CONFIG_PATH (#169)
---
 c/driver/postgres/README.md |  5 +++--
 c/driver/postgres/util.h    | 10 +++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/c/driver/postgres/README.md b/c/driver/postgres/README.md
index 9e1c21e..ec57399 100644
--- a/c/driver/postgres/README.md
+++ b/c/driver/postgres/README.md
@@ -29,8 +29,9 @@ still a work in progress.
 
 ## Building
 
-Dependencies: libpq itself.  This can be installed with your favorite
-package manager.
+Dependencies: libpq itself. This can be installed with your favorite
+package manager; however, you may need to set the `PKG_CONFIG_PATH`
+environment variable such that `pkg-config` can find libpq.
 
 See [CONTRIBUTING.md](../../CONTRIBUTING.md) for details.
 
diff --git a/c/driver/postgres/util.h b/c/driver/postgres/util.h
index 1442ff3..83b6304 100644
--- a/c/driver/postgres/util.h
+++ b/c/driver/postgres/util.h
@@ -113,13 +113,13 @@ static inline void SetError(struct AdbcError* error, 
Args&&... args) {
 
 /// Endianness helpers
 
-uint32_t LoadNetworkUInt32(const char* buf) {
+static inline uint32_t LoadNetworkUInt32(const char* buf) {
   uint32_t v = 0;
   std::memcpy(&v, buf, sizeof(uint32_t));
   return ntohl(v);
 }
 
-int64_t LoadNetworkUInt64(const char* buf) {
+static inline int64_t LoadNetworkUInt64(const char* buf) {
   uint64_t v = 0;
   std::memcpy(&v, buf, sizeof(uint64_t));
 #if defined(__linux__)
@@ -131,15 +131,15 @@ int64_t LoadNetworkUInt64(const char* buf) {
 #endif
 }
 
-int32_t LoadNetworkInt32(const char* buf) {
+static inline int32_t LoadNetworkInt32(const char* buf) {
   return static_cast<int32_t>(LoadNetworkUInt32(buf));
 }
 
-int64_t LoadNetworkInt64(const char* buf) {
+static inline int64_t LoadNetworkInt64(const char* buf) {
   return static_cast<int64_t>(LoadNetworkUInt64(buf));
 }
 
-uint64_t ToNetworkInt64(int64_t v) {
+static inline uint64_t ToNetworkInt64(int64_t v) {
 #if defined(__linux__)
   return htobe64(static_cast<uint64_t>(v));
 #elif defined(__APPLE__)

Reply via email to