diff --git a/net/mutella/Makefile b/net/mutella/Makefile index 42ad14a88ca..0b99a4cda9c 100644 --- a/net/mutella/Makefile +++ b/net/mutella/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.13 2017/04/10 11:46:32 sthen Exp $ +# $OpenBSD: Makefile,v 1.14 2017/05/11 16:28:58 espie Exp $ COMMENT= gnutella client with an easy to use interface @@ -18,4 +18,10 @@ SEPARATE_BUILD= Yes CONFIGURE_STYLE= gnu + .include + +# this warning is dubious for now +.if ${PROPERTIES:Mclang} +CXXFLAGS += -Wno-undefined-var-template +.endif diff --git a/net/mutella/patches/patch-mutella_common_h b/net/mutella/patches/patch-mutella_common_h new file mode 100644 index 00000000000..69399115a14 --- /dev/null +++ b/net/mutella/patches/patch-mutella_common_h @@ -0,0 +1,15 @@ +$OpenBSD: patch-mutella_common_h,v 1.1 2017/05/11 16:28:58 espie Exp $ +clang looks at parameter names... twice the same one ? not a good idea. + +Index: mutella/common.h +--- mutella/common.h.orig ++++ mutella/common.h +@@ -50,7 +50,7 @@ CString restore_string(CString s, bool bFormMode = tru + bool QueryMatch(CString Result, const CString& Query); + // fast functions which do not copy the string + void MakeWordList(LPSTR szQuery, vector& QWords); +-void MakeWordList(LPSTR szQuery, vector& QWords, vector& QWords); ++void MakeWordList(LPSTR szQuery, vector&, vector&); + bool MatchWordList(const CString& ResultLower, const vector& QWords, bool bMatchAll = true); + + // slower but 'storage-independent' versions diff --git a/net/mutella/patches/patch-mutella_uiremote_cpp b/net/mutella/patches/patch-mutella_uiremote_cpp new file mode 100644 index 00000000000..996df8cd531 --- /dev/null +++ b/net/mutella/patches/patch-mutella_uiremote_cpp @@ -0,0 +1,37 @@ +$OpenBSD: patch-mutella_uiremote_cpp,v 1.1 2017/05/11 16:28:58 espie Exp $ + +Index: mutella/uiremote.cpp +--- mutella/uiremote.cpp.orig ++++ mutella/uiremote.cpp +@@ -575,11 +575,11 @@ bool MUIRemotePriv::on_http_request(const IP& ipRemote + { + // login -- HTTP-Basic so far + bool bLoginOK = false; +- char * pszAuth = NULL; ++ const char * pszAuth = NULL; + if ( (pszAuth = strstr(szHandshake, "Authorization:")) ) + { + // extract authorization line +- char * pRN = strstr(pszAuth, "\r\n"); ++ const char * pRN = strstr(pszAuth, "\r\n"); + CString sAuthLine(pszAuth + strlen("Authorization:"), pRN-pszAuth-strlen("Authorization:")); + int nPos = sAuthLine.find("Basic"); + if (nPos>=0) +@@ -616,7 +616,7 @@ bool MUIRemotePriv::on_http_request(const IP& ipRemote + const char* pszCookie; + if( (pszCookie = strstr(szHandshake, "Cookie:")) ) + { +- char * pRN = strstr(pszCookie, "\r\n"); ++ const char * pRN = strstr(pszCookie, "\r\n"); + CString sCookieLine(pszCookie + strlen("Cookie:"), pRN-pszCookie-strlen("Cookie:")); + // we will split the line by "; " combination + list Cookies; +@@ -1288,7 +1288,7 @@ enum TagResolv{ + #define TAG_ENVLISTITEM "#ENVLISTITEM#" + + struct STagEntry{ +- char* tag; ++ const char* tag; + TagResolv res; + }; +