[Bug 263972] net-mgmt/p0f: Fix build on 13.1 and current
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 14 May 2022 13:48:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263972 Bug ID: 263972 Summary: net-mgmt/p0f: Fix build on 13.1 and current Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: pi@FreeBSD.org Reporter: jkim@FreeBSD.org Flags: maintainer-feedback?(pi@FreeBSD.org) Assignee: pi@FreeBSD.org Created attachment 233910 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=233910&action=edit Fix build on recent FreeBSD It seems recent header change broke the build. ----------- [*] Compiling p0f... FAIL Well, something went horribly wrong, sorry. Here's the output from GCC: p0f.c:488:26: warning: 'pcap_lookupdev' is deprecated: use 'pcap_findalldevs' and use the first device [-Wdeprecated-declarations] use_iface = (u8*)pcap_lookupdev(pcap_err); ^ /usr/local/include/pcap/pcap.h:395:1: note: 'pcap_lookupdev' has been explicitly marked deprecated here PCAP_DEPRECATED(pcap_lookupdev, "use 'pcap_findalldevs' and use the first device"); ^ /usr/local/include/pcap/funcattrs.h:293:53: note: expanded from macro 'PCAP_DEPRECATED' #define PCAP_DEPRECATED(func, msg) __attribute__((deprecated(msg))) ^ 1 warning generated. process.c:112:37: warning: implicit declaration of function 'offsetof' is invalid in C99 [-Wimplicit-function-declaration] case DLT_PFLOG: link_off = PFLOG_HDRLEN; return; ^ /usr/include/net/if_pflog.h:64:35: note: expanded from macro 'PFLOG_HDRLEN' #define PFLOG_HDRLEN PFLOG_ALIGN(offsetof(struct pfloghdr, pad2)) ^ process.c:112:37: error: expected expression /usr/include/net/if_pflog.h:64:44: note: expanded from macro 'PFLOG_HDRLEN' #define PFLOG_HDRLEN PFLOG_ALIGN(offsetof(struct pfloghdr, pad2)) ^ process.c:112:37: error: use of undeclared identifier 'pad2' /usr/include/net/if_pflog.h:64:61: note: expanded from macro 'PFLOG_HDRLEN' #define PFLOG_HDRLEN PFLOG_ALIGN(offsetof(struct pfloghdr, pad2)) ^ 1 warning and 2 errors generated. Sorry! You may want to ping <lcamtuf@coredump.cx> about this. *** [all] Error code 1 ----------- I think 4daa31c10867b133bdc2a424e1e60d280384dc56 was the culprit. https://cgit.freebsd.org/src/commit/?id=4daa31c10867b133bdc2a424e1e60d280384dc56 Anyway, the attached patch fix the problem for me. -- You are receiving this mail because: You are the assignee for the bug.