From 2b012a60a0d06060490a68accdceab3c62101eb0 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 2 Oct 2015 10:29:26 +0200 Subject: [PATCH] account_creator: disable regex on win32 --- coreapi/account_creator.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/coreapi/account_creator.c b/coreapi/account_creator.c index 0f07e6ca0..0843175c5 100644 --- a/coreapi/account_creator.c +++ b/coreapi/account_creator.c @@ -19,7 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "account_creator.h" #include "private.h" +#if !_WIN32 #include "regex.h" +#endif BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneAccountCreatorCbs); @@ -164,12 +166,16 @@ static LinphoneAccountCreatorStatus validate_uri(const char* username, const cha } static bool_t is_matching_regex(const char *entry, const char* regex) { +#if _WIN32 + return TRUE; +#else regex_t regex_pattern; int res; regcomp(®ex_pattern, regex, 0); res = regexec(®ex_pattern, entry, 0, NULL, 0); regfree(®ex_pattern); return (res != REG_NOMATCH); +#endif } LinphoneAccountCreatorStatus linphone_account_creator_set_username(LinphoneAccountCreator *creator, const char *username) {