Bug 243108 - [PATCH] security/nmap: Fix build when libpcap installed
Summary: [PATCH] security/nmap: Fix build when libpcap installed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Olli Hauer
Keywords: buildisok
Depends on:
Reported: 2020-01-05 07:13 UTC by Greg Lewis
Modified: 2020-02-22 18:01 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (ohauer)

Force the internal headers to be used (1.00 KB, patch)
2020-01-05 07:13 UTC, Greg Lewis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Lewis freebsd_committer 2020-01-05 07:13:32 UTC
Created attachment 210461 [details]
Force the internal headers to be used

I tried to build security/nmap with net/libpcap installed and it failed building nmap's internally bundled libpcap:

cc -fvisibility=hidden -O2 -pipe  -I/usr/local/include -fstack-protector-strong -fno-strict-aliasing  -fpic -I.  -I/usr/local/include -DBUILDING_PCAP -Dpcap_EXPORTS -DHAVE_CONFIG_H  -O2 -pipe  -I/usr/local/include -fstack-protector-strong -fno-strict-aliasing     -c ./pcap.c
./pcap.c:2911:2: error: use of undeclared identifier 'DLT_IPMB'
./pcap.c:2829:61: note: expanded from macro 'DLT_CHOICE'
#define DLT_CHOICE(code, description) { #code, description, DLT_ ## code }
<scratch space>:261:1: note: expanded from here
1 error generated.
gmake[3]: *** [Makefile:84: pcap.o] Error 1

The attached patch for the Makefile fixed this by forcing it to use the internal headers rather than the headers from net/libpcap that are installed in /usr/local/include.
Comment 1 Automation User 2020-01-20 00:07:09 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/110612928
Comment 2 commit-hook freebsd_committer 2020-02-22 17:59:51 UTC
A commit references this bug:

Author: glewis
Date: Sat Feb 22 17:59:43 UTC 2020
New revision: 526844
URL: https://svnweb.freebsd.org/changeset/ports/526844

  Force the bundled libpcap headers to be used

  This fixes the build when the separate libpcap port is installed

  PR:		243108
  Approved by:	maintainer timeout