mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-22 02:27:09 +01:00
[evpp] Fix build error on OSX (#11967)
* [evpp] Fix build error on OSX * update baseline
This commit is contained in:
parent
1658781750
commit
f8e975d44a
@ -1,5 +1,5 @@
|
|||||||
Source: evpp
|
Source: evpp
|
||||||
Version: 0.7.0-2
|
Version: 0.7.0-3
|
||||||
Homepage: https://github.com/Qihoo360/evpp
|
Homepage: https://github.com/Qihoo360/evpp
|
||||||
Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols.
|
Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols.
|
||||||
Build-Depends: glog, libevent (windows), libevent[openssl] (!windows), rapidjson, concurrentqueue (!windows), boost-lockfree (!windows)
|
Build-Depends: glog, libevent (windows), libevent[openssl] (!windows), rapidjson, concurrentqueue (!windows), boost-lockfree (!windows)
|
45
ports/evpp/fix-osx-build.patch
Normal file
45
ports/evpp/fix-osx-build.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
diff --git a/evpp/server_status.h b/evpp/server_status.h
|
||||||
|
index 3a83725..f28f833 100644
|
||||||
|
--- a/evpp/server_status.h
|
||||||
|
+++ b/evpp/server_status.h
|
||||||
|
@@ -25,7 +25,7 @@ public:
|
||||||
|
};
|
||||||
|
|
||||||
|
std::string StatusToString() const {
|
||||||
|
- H_CASE_STRING_BIGIN(status_);
|
||||||
|
+ H_CASE_STRING_BIGIN(+status_);
|
||||||
|
H_CASE_STRING(kNull);
|
||||||
|
H_CASE_STRING(kInitialized);
|
||||||
|
H_CASE_STRING(kRunning);
|
||||||
|
diff --git a/evpp/sockets.cc b/evpp/sockets.cc
|
||||||
|
index 333c05c..c547d88 100644
|
||||||
|
--- a/evpp/sockets.cc
|
||||||
|
+++ b/evpp/sockets.cc
|
||||||
|
@@ -22,6 +22,14 @@ std::string strerror(int e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
return empty_string;
|
||||||
|
+#elif defined(__APPLE__)
|
||||||
|
+ char buf[2048] = {};
|
||||||
|
+ strerror_r(e, buf, sizeof(buf) - 1);
|
||||||
|
+ const char* s = buf;
|
||||||
|
+ if (s) {
|
||||||
|
+ return std::string(s);
|
||||||
|
+ }
|
||||||
|
+ return std::string();
|
||||||
|
#else
|
||||||
|
char buf[2048] = {};
|
||||||
|
const char* s = strerror_r(e, buf, sizeof(buf) - 1);
|
||||||
|
diff --git a/evpp/tcp_conn.cc b/evpp/tcp_conn.cc
|
||||||
|
index b7678d0..527b2b9 100644
|
||||||
|
--- a/evpp/tcp_conn.cc
|
||||||
|
+++ b/evpp/tcp_conn.cc
|
||||||
|
@@ -309,7 +309,7 @@ void TCPConn::SetTCPNoDelay(bool on) {
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string TCPConn::StatusToString() const {
|
||||||
|
- H_CASE_STRING_BIGIN(status_);
|
||||||
|
+ H_CASE_STRING_BIGIN(+status_);
|
||||||
|
H_CASE_STRING(kDisconnected);
|
||||||
|
H_CASE_STRING(kConnecting);
|
||||||
|
H_CASE_STRING(kConnected);
|
@ -1,5 +1,3 @@
|
|||||||
include(vcpkg_common_functions)
|
|
||||||
|
|
||||||
set(EVPP_VERSION 0.7.0)
|
set(EVPP_VERSION 0.7.0)
|
||||||
|
|
||||||
vcpkg_from_github(
|
vcpkg_from_github(
|
||||||
@ -11,13 +9,16 @@ vcpkg_from_github(
|
|||||||
PATCHES
|
PATCHES
|
||||||
fix-rapidjson-1-1.patch
|
fix-rapidjson-1-1.patch
|
||||||
fix-linux-build.patch
|
fix-linux-build.patch
|
||||||
|
fix-osx-build.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/rapidjson ${SOURCE_PATH}/3rdparty/concurrentqueue)
|
file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/rapidjson ${SOURCE_PATH}/3rdparty/concurrentqueue)
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
PREFER_NINJA
|
PREFER_NINJA
|
||||||
OPTIONS -DEVPP_VCPKG_BUILD=ON
|
OPTIONS
|
||||||
|
-DEVPP_VCPKG_BUILD=ON
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
|
@ -397,7 +397,6 @@ epsilon:arm-uwp=fail
|
|||||||
epsilon:x64-linux=fail
|
epsilon:x64-linux=fail
|
||||||
epsilon:x64-osx=fail
|
epsilon:x64-osx=fail
|
||||||
epsilon:x64-uwp=fail
|
epsilon:x64-uwp=fail
|
||||||
evpp:x64-osx=fail
|
|
||||||
expat:arm-uwp=fail
|
expat:arm-uwp=fail
|
||||||
expat:x64-uwp=fail
|
expat:x64-uwp=fail
|
||||||
faad2:x64-linux=fail
|
faad2:x64-linux=fail
|
||||||
|
Loading…
x
Reference in New Issue
Block a user