Skip to content
Snippets Groups Projects
Commit 3d358fec authored by Alexandre Lision's avatar Alexandre Lision Committed by Guillaume Roguez
Browse files

osx: fix compilation


Issue introduced in 27d9dfac
GCC uses a built-in version of constexpr which gives an error with clang:

Refs #66543

Change-Id: Id4b653fbe8c905784efe2236521632a817274861
Signed-off-by: default avatarGuillaume Roguez <guillaume.roguez@savoirfairelinux.com>
parent b36f8940
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <utility> #include <utility>
#include <string> #include <string>
#include <vector> #include <vector>
#include <cstring> // strcmp
struct pjsip_msg; struct pjsip_msg;
...@@ -56,8 +57,9 @@ constexpr const char* getKeyExchangeName(KeyExchangeProtocol kx) { ...@@ -56,8 +57,9 @@ constexpr const char* getKeyExchangeName(KeyExchangeProtocol kx) {
return kx == KeyExchangeProtocol::SDES ? "sdes" : ( return kx == KeyExchangeProtocol::SDES ? "sdes" : (
kx == KeyExchangeProtocol::ZRTP ? "zrtp" : ""); kx == KeyExchangeProtocol::ZRTP ? "zrtp" : "");
} }
constexpr KeyExchangeProtocol getKeyExchangeProtocol(const char* name) {
return !strcmp("sdes", name) ? KeyExchangeProtocol::SDES : KeyExchangeProtocol::NONE; static inline KeyExchangeProtocol getKeyExchangeProtocol(const char* name) {
return !std::strcmp("sdes", name) ? KeyExchangeProtocol::SDES : KeyExchangeProtocol::NONE;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment