Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 May 2022 13:48:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 263972] net-mgmt/p0f: Fix build on 13.1 and current
Message-ID:  <bug-263972-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263972

            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=3D233910&action=
=3Dedit
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_findalldev=
s'
and use the first device [-Wdeprecated-declarations]
        use_iface =3D (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 =3D 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=3D4daa31c10867b133bdc2a424e1e60d280=
384dc56

Anyway, the attached patch fix the problem for me.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-263972-7788>