Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Jul 2012 18:27:09 +0300
From:      Jan Beich <jbeich@tormail.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/169682: [patch] net/libproxy: unbreak with gcc47/libc++
Message-ID:  <1SnAQj-0004c9-PH@internal.tormail.org>
Resent-Message-ID: <201207061530.q66FUHcY014286@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         169682
>Category:       ports
>Synopsis:       [patch] net/libproxy: unbreak with gcc47/libc++
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 06 15:30:16 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
>Description:
>How-To-Repeat:
$ make CC=gcc47 CXX=g++47
[...]
[ 68%] Building CXX object libproxy/CMakeFiles/libproxy.dir/url.cpp.o
/usr/ports/net/libproxy/work/libproxy-0.4.6/libproxy/url.cpp: In member function 'char* libproxy::url::get_pac()':
/usr/ports/net/libproxy/work/libproxy-0.4.6/libproxy/url.cpp:405:37: error: 'read' was not declared in this scope
/usr/ports/net/libproxy/work/libproxy-0.4.6/libproxy/url.cpp:430:13: error: 'close' was not declared in this scope
/usr/ports/net/libproxy/work/libproxy-0.4.6/libproxy/url.cpp:446:13: error: 'close' was not declared in this scope
*** [libproxy/CMakeFiles/libproxy.dir/url.cpp.o] Error code 1
>Fix:
--- gcc47.diff begins here ---
Index: net/libproxy/files/patch-libproxy_url.cpp
===================================================================
RCS file: net/libproxy/files/patch-libproxy_url.cpp
diff -N net/libproxy/files/patch-libproxy_url.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ net/libproxy/files/patch-libproxy_url.cpp	6 Jul 2012 15:16:40 -0000
@@ -0,0 +1,10 @@
+--- libproxy/url.cpp~
++++ libproxy/url.cpp
+@@ -27,6 +27,7 @@
+ #define close _close
+ #endif
+ #include <fcntl.h> // For ::open()
++#include <unistd.h> // For close()
+ #include <cstring> // For memcpy()
+ #include <sstream> // For int/string conversion (using stringstream)
+ #include <cstdio>  // For sscanf()
Index: net/libproxy/files/patch-utils-CMakeLists.txt
===================================================================
RCS file: net/libproxy/files/patch-utils-CMakeLists.txt
diff -N net/libproxy/files/patch-utils-CMakeLists.txt
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ net/libproxy/files/patch-utils-CMakeLists.txt	6 Jul 2012 15:21:52 -0000
@@ -0,0 +1,8 @@
+--- utils/CMakeLists.txt~
++++ utils/CMakeLists.txt
+@@ -3,4 +3,5 @@ link_directories(${LIBPROXY_LIBRARY_DIRS
+ 
+ add_executable(proxy proxy.c)
+ target_link_libraries(proxy libproxy)
++set(CMAKE_C_COMPILER ${CMAKE_CXX_COMPILER})
+ install(TARGETS proxy RUNTIME DESTINATION ${BIN_INSTALL_DIR})
--- gcc47.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1SnAQj-0004c9-PH>