ports/152548: [PATCH] net/GeoIP: don't redefined memcpy
Dmitry Marakasov
amdmi3 at amdmi3.ru
Wed Nov 24 17:00:25 UTC 2010
>Number: 152548
>Category: ports
>Synopsis: [PATCH] net/GeoIP: don't redefined memcpy
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Nov 24 17:00:24 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Dmitry Marakasov
>Release: FreeBSD 8.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD hades.panopticon 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Fri Jul 30 02:50:28 MSD 2010
>Description:
GeoIP.h instelled by net/GeoIP has
#define memcpy(dest, src, n) bcopy(src, dest, n)
which breaks building stuff that uses that include under certain
circumstances (see How-To-Repeat). In real world, this prevents
building qbittorrent without GUI.
The patch removes that bogus define. I've mailed GeoIP devs and
they are going to remove it upstream as well.
Added file(s):
- files/patch-libGeoIP-GeoIP.h
Port maintainer (dhn at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
% cat > 1.cpp
#include <sys/param.h>
#include <cstring>
#include <GeoIP.h>
int main() {
std::memcpy(NULL, NULL, 0);
}
^D
% c++ -I/usr/local/include 1.cpp
1.cpp: In function 'int main()':
1.cpp:6: error: 'bcopy' is not a member of 'std'
%
>Fix:
--- GeoIP-1.4.6_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/net/GeoIP/Makefile,v
retrieving revision 1.44
diff -u -u -r1.44 Makefile
--- Makefile 2 Aug 2009 19:34:54 -0000 1.44
+++ Makefile 24 Nov 2010 16:21:40 -0000
@@ -7,6 +7,7 @@
PORTNAME= GeoIP
PORTVERSION= 1.4.6
+PORTREVISION= 1
CATEGORIES= net geography
MASTER_SITES= http://geolite.maxmind.com/download/geoip/api/c/
Index: files/patch-libGeoIP-GeoIP.h
===================================================================
RCS file: files/patch-libGeoIP-GeoIP.h
diff -N files/patch-libGeoIP-GeoIP.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-libGeoIP-GeoIP.h 24 Nov 2010 16:21:26 -0000
@@ -0,0 +1,13 @@
+--- libGeoIP/GeoIP.h.orig 2009-02-24 19:03:23.000000000 +0300
++++ libGeoIP/GeoIP.h 2010-11-24 19:21:26.000000000 +0300
+@@ -241,10 +241,6 @@
+ /* Get timezone from country and region code */
+ GEOIP_API const char * GeoIP_time_zone_by_country_and_region(const char *country_code, const char *region_code);
+
+-#ifdef BSD
+-#define memcpy(dest, src, n) bcopy(src, dest, n)
+-#endif
+-
+ #ifdef __cplusplus
+ }
+ #endif
--- GeoIP-1.4.6_1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list