Bug 152548 - [PATCH] net/GeoIP: don't redefined memcpy
Summary: [PATCH] net/GeoIP: don't redefined memcpy
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dennis Herrmann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-24 17:00 UTC by Dmitry Marakasov
Modified: 2011-03-27 13:00 UTC (History)
1 user (show)

See Also:


Attachments
GeoIP-1.4.6_1.patch (1.15 KB, patch)
2010-11-24 17:00 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov 2010-11-24 17:00:24 UTC
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@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'
%
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-11-24 17:00:32 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dhn

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2011-03-27 12:58:35 UTC
dhn         2011-03-27 11:58:26 UTC

  FreeBSD ports repository

  Modified files:
    net/GeoIP            Makefile 
  Added files:
    net/GeoIP/files      patch-libGeoIP-GeoIP.h 
  Log:
  - Remove memcpy/bcopy macro
  - Bump PORTREVISION
  
  PR:             ports/152548
  Submitted by:   Dmitry Marakasov <amdmi3@amdmi3.ru>
  
  Revision  Changes    Path
  1.46      +1 -0      ports/net/GeoIP/Makefile
  1.1       +13 -0     ports/net/GeoIP/files/patch-libGeoIP-GeoIP.h (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Dennis Herrmann freebsd_committer freebsd_triage 2011-03-27 12:58:38 UTC
State Changed
From-To: open->closed

Committed. Thanks!