aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffin Downs <35574547+grdowns@users.noreply.github.com>2019-04-12 08:20:23 -0700
committerGitHub <noreply@github.com>2019-04-12 08:20:23 -0700
commit0bfa4c82b05f3fb77f5ff4abdba1b132e70d0a31 (patch)
treed44a6b4de63306a635c4f8e7a93aea5b4f2c871e
parent7927c412499036f301788c21af4d796b64a84f67 (diff)
parent0cac89b6017fb134b180f8111e5040ee6312c6e9 (diff)
downloadvcpkg-0bfa4c82b05f3fb77f5ff4abdba1b132e70d0a31.tar.gz
vcpkg-0bfa4c82b05f3fb77f5ff4abdba1b132e70d0a31.zip
Merge pull request #6016 from edmBernard/dev/fix_libpq_on_linux
[libpq] fix error at link time on linux
-rw-r--r--ports/libpq/CMakeLists.txt8
-rw-r--r--ports/libpq/CONTROL2
2 files changed, 9 insertions, 1 deletions
diff --git a/ports/libpq/CMakeLists.txt b/ports/libpq/CMakeLists.txt
index 68da9356c..13c129317 100644
--- a/ports/libpq/CMakeLists.txt
+++ b/ports/libpq/CMakeLists.txt
@@ -66,6 +66,9 @@ if(WIN32)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND pg_port_src
src/port/strlcpy.c
+ src/port/inet_aton.c
+ src/port/inet_net_ntop.c
+ src/port/getpeereid.c
)
endif()
@@ -130,7 +133,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_DEBUG_POSTFIX "d")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_library(libpq ${pg_port_src} ${pg_backend_src} ${pg_libpq_src})
+
target_compile_definitions(libpq PRIVATE -DFRONTEND -DENABLE_THREAD_SAFETY -DUSE_OPENSSL -D_CRT_SECURE_NO_WARNINGS)
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ target_compile_definitions(libpq PRIVATE -D_GNU_SOURCE)
+endif()
+
target_link_libraries(libpq PRIVATE OpenSSL::SSL)
if(WIN32)
target_link_libraries(libpq PRIVATE ws2_32 secur32 advapi32 shell32)
diff --git a/ports/libpq/CONTROL b/ports/libpq/CONTROL
index 2755a2831..ac0793b13 100644
--- a/ports/libpq/CONTROL
+++ b/ports/libpq/CONTROL
@@ -1,4 +1,4 @@
Source: libpq
-Version: 9.6.1-5
+Version: 9.6.1-6
Description: The official database access API of postgresql
Build-Depends: openssl, zlib (linux)