From e0e63bd52011271232caa530050f40aafce82400 Mon Sep 17 00:00:00 2001 From: sthen Date: Mon, 17 Apr 2017 20:45:38 +0000 Subject: [PATCH] fix net/libproxy with libc++ by defining _POSIX_C_SOURCE=200809L and _BSD_SOURCE clues from kettenis, espie --- net/libproxy/Makefile | 5 +++-- .../patches/patch-libproxy_CMakeLists_txt | 18 +++++++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/net/libproxy/Makefile b/net/libproxy/Makefile index 9bb8f4c8c14..4d598eab5a3 100644 --- a/net/libproxy/Makefile +++ b/net/libproxy/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.52 2017/04/10 11:46:32 sthen Exp $ +# $OpenBSD: Makefile,v 1.53 2017/04/17 20:45:38 sthen Exp $ COMMENT-main= library handling all the details of proxy configuration COMMENT-webkit= pacrunner libproxy plugin for webkit-based browsers @@ -8,7 +8,8 @@ GH_PROJECT= libproxy GH_TAGNAME= 0.4.14 SUBST_VARS= GH_TAGNAME -REVISION-main= 0 +REVISION-main= 1 +REVISION-webkit= 0 PKGNAME-main= ${DISTNAME} PKGNAME-webkit= ${GH_PROJECT}-webkit-${GH_TAGNAME} diff --git a/net/libproxy/patches/patch-libproxy_CMakeLists_txt b/net/libproxy/patches/patch-libproxy_CMakeLists_txt index fd30500a917..61a98a28833 100644 --- a/net/libproxy/patches/patch-libproxy_CMakeLists_txt +++ b/net/libproxy/patches/patch-libproxy_CMakeLists_txt @@ -1,14 +1,22 @@ -$OpenBSD: patch-libproxy_CMakeLists_txt,v 1.4 2013/06/09 09:40:19 ajacoutot Exp $ +$OpenBSD: patch-libproxy_CMakeLists_txt,v 1.5 2017/04/17 20:45:38 sthen Exp $ +Adding -pthread: https://code.google.com/p/libproxy/issues/detail?id=196&thanks=196&ts=1370457244 ---- libproxy/CMakeLists.txt.orig Fri Nov 30 17:31:35 2012 -+++ libproxy/CMakeLists.txt Wed Jun 5 15:00:37 2013 -@@ -7,7 +7,7 @@ if (WIN32) +Changing _POSIX_C_SOURCE, adding _BSD_SOURCE: fix with clang/libc++ +/usr/include/c++/v1/__bsd_locale_fallbacks.h:51:12: error: use of undeclared identifier 'wcsnrtombs' +etc. + +--- libproxy/CMakeLists.txt.orig Mon Jan 9 14:22:22 2017 ++++ libproxy/CMakeLists.txt Sun Apr 16 22:16:52 2017 +@@ -6,8 +6,9 @@ set_project_version(0 4 14) + if (WIN32) add_definitions(-D_CRT_SECURE_NO_WARNINGS=1) else(WIN32) - add_definitions(-D_POSIX_C_SOURCE=200112L) +- add_definitions(-D_POSIX_C_SOURCE=200112L) - set(CMAKE_CXX_FLAGS "-fvisibility=hidden ${CMAKE_CXX_FLAGS}") ++ add_definitions(-D_POSIX_C_SOURCE=200809L) ++ add_definitions(-D_BSD_SOURCE) + set(CMAKE_CXX_FLAGS "-fvisibility=hidden -pthread ${CMAKE_CXX_FLAGS}") endif(WIN32)