From 3d358fec2ed489417be1c0f46c29a2973b828c6f Mon Sep 17 00:00:00 2001
From: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
Date: Fri, 13 Mar 2015 09:39:44 -0400
Subject: [PATCH] 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: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
---
 daemon/src/sip/sip_utils.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/daemon/src/sip/sip_utils.h b/daemon/src/sip/sip_utils.h
index 2e70cf5aa2..e64fbba888 100644
--- a/daemon/src/sip/sip_utils.h
+++ b/daemon/src/sip/sip_utils.h
@@ -42,6 +42,7 @@
 #include <utility>
 #include <string>
 #include <vector>
+#include <cstring> // strcmp
 
 struct pjsip_msg;
 
@@ -56,8 +57,9 @@ constexpr const char* getKeyExchangeName(KeyExchangeProtocol kx) {
     return kx == KeyExchangeProtocol::SDES ? "sdes" : (
         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;
 }
 
 /**
-- 
GitLab