From fc8abadaeb2ba0b051e9b7e29cf581c0dee8eb66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marwan=20Rabb=C3=A2a?= <1440729+waghanza@users.noreply.github.com> Date: Sun, 3 Nov 2019 16:32:37 +0100 Subject: [PATCH] fix(compilation on alpine): Replace non standard u_short alias (#292) --- lib/inc/drogon/HttpAppFramework.h | 2 +- lib/src/ConfigLoader.cc | 2 +- lib/src/DbClientManager.h | 2 +- lib/src/DbClientManagerSkipped.cc | 2 +- lib/src/HttpAppFrameworkImpl.cc | 2 +- lib/src/HttpAppFrameworkImpl.h | 2 +- orm_lib/src/DbClientManager.cc | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/inc/drogon/HttpAppFramework.h b/lib/inc/drogon/HttpAppFramework.h index 1c204242..0f8f7161 100644 --- a/lib/inc/drogon/HttpAppFramework.h +++ b/lib/inc/drogon/HttpAppFramework.h @@ -902,7 +902,7 @@ class HttpAppFramework : public trantor::NonCopyable virtual HttpAppFramework &createDbClient( const std::string &dbType, const std::string &host, - const u_short port, + const unsigned short port, const std::string &databaseName, const std::string &userName, const std::string &password, diff --git a/lib/src/ConfigLoader.cc b/lib/src/ConfigLoader.cc index 9ee5e557..fe2e3f37 100644 --- a/lib/src/ConfigLoader.cc +++ b/lib/src/ConfigLoader.cc @@ -389,7 +389,7 @@ static void loadDbClients(const Json::Value &dbClients) auto isFast = client.get("is_fast", false).asBool(); drogon::app().createDbClient(type, host, - (u_short)port, + (unsigned short)port, dbname, user, password, diff --git a/lib/src/DbClientManager.h b/lib/src/DbClientManager.h index d7a2458d..9153b1d3 100644 --- a/lib/src/DbClientManager.h +++ b/lib/src/DbClientManager.h @@ -44,7 +44,7 @@ class DbClientManager : public trantor::NonCopyable } void createDbClient(const std::string &dbType, const std::string &host, - const u_short port, + const unsigned short port, const std::string &databaseName, const std::string &userName, const std::string &password, diff --git a/lib/src/DbClientManagerSkipped.cc b/lib/src/DbClientManagerSkipped.cc index 54fea912..e59b6836 100644 --- a/lib/src/DbClientManagerSkipped.cc +++ b/lib/src/DbClientManagerSkipped.cc @@ -29,7 +29,7 @@ void DbClientManager::createDbClients( void DbClientManager::createDbClient(const std::string &dbType, const std::string &host, - const u_short port, + const unsigned short port, const std::string &databaseName, const std::string &userName, const std::string &password, diff --git a/lib/src/HttpAppFrameworkImpl.cc b/lib/src/HttpAppFrameworkImpl.cc index 28e6a1b1..5f09d37f 100644 --- a/lib/src/HttpAppFrameworkImpl.cc +++ b/lib/src/HttpAppFrameworkImpl.cc @@ -735,7 +735,7 @@ orm::DbClientPtr HttpAppFrameworkImpl::getFastDbClient(const std::string &name) HttpAppFramework &HttpAppFrameworkImpl::createDbClient( const std::string &dbType, const std::string &host, - const u_short port, + const unsigned short port, const std::string &databaseName, const std::string &userName, const std::string &password, diff --git a/lib/src/HttpAppFrameworkImpl.h b/lib/src/HttpAppFrameworkImpl.h index 928e558a..320da6f1 100644 --- a/lib/src/HttpAppFrameworkImpl.h +++ b/lib/src/HttpAppFrameworkImpl.h @@ -366,7 +366,7 @@ class HttpAppFrameworkImpl : public HttpAppFramework virtual HttpAppFramework &createDbClient( const std::string &dbType, const std::string &host, - const u_short port, + const unsigned short port, const std::string &databaseName, const std::string &userName, const std::string &password, diff --git a/orm_lib/src/DbClientManager.cc b/orm_lib/src/DbClientManager.cc index 5599f5ad..15a44156 100644 --- a/orm_lib/src/DbClientManager.cc +++ b/orm_lib/src/DbClientManager.cc @@ -87,7 +87,7 @@ void DbClientManager::createDbClients( void DbClientManager::createDbClient(const std::string &dbType, const std::string &host, - const u_short port, + const unsigned short port, const std::string &databaseName, const std::string &userName, const std::string &password,