fix net/libproxy with libc++ by defining _POSIX_C_SOURCE=200809L and _BSD_SOURCE

clues from kettenis, espie
This commit is contained in:
sthen 2017-04-17 20:45:38 +00:00
parent fc6907440c
commit e0e63bd520
2 changed files with 16 additions and 7 deletions

View File

@ -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}

View File

@ -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)