Bug 275313

Summary: net/dhcpd fails to build on 15-CURRENT
Product: Ports & Packages Reporter: Mallory <mallorya>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: arved, koue, mizhka
Priority: --- Flags: koue: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275217
Attachments:
Description Flags
dhcpd patch koue: maintainer-approval+

Description Mallory 2023-11-24 17:58:54 UTC
It builds on 14.0-RELEASE but not 15-CURRENT.

That's because `DIOCKILLSTATES` was removed in favor of `DIOCKILLSTATESNV`: https://reviews.freebsd.org/D30056

```
cc  -O2 -pipe  -Wall -fstack-protector-strong -fno-strict-aliasing    -Wall -D__dead='' -fPIE -MD  -MF.depend.pfutils.o -MTpfutils.o -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/16/include -fstack-protector-strong    -Qunused-arguments     -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual -c pfutils.c -o pfutils.o
pfutils.c:51:16: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
pftable_handler()
               ^
                void
pfutils.c:193:16: error: use of undeclared identifier 'DIOCKILLSTATES'
        if (ioctl(fd, DIOCKILLSTATES, &psk) == -1) {
                      ^
pfutils.c:203:16: error: use of undeclared identifier 'DIOCKILLSTATES'
        if (ioctl(fd, DIOCKILLSTATES, &psk) == -1) {
                      ^
1 warning and 2 errors generated.
*** [pfutils.o] Error code 1

make[2]: stopped in /home/freebsd/ports/net/dhcpd/work/dhcpd-6.6.20200413/src/usr.sbin/dhcpd
1 error
```
Comment 1 Nikola Kolev 2024-02-29 18:47:34 UTC
Created attachment 248829 [details]
dhcpd patch

Compile dhcpd on FreeBSD 15.
Comment 2 Tilman Keskinoz freebsd_committer freebsd_triage 2024-05-05 16:25:47 UTC
committed, thanks
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-05-05 16:26:02 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ad291cdd00b7e7c6db2fce4e71811e4e83a3b5bc

commit ad291cdd00b7e7c6db2fce4e71811e4e83a3b5bc
Author:     Tilman Keskinoz <arved@FreeBSD.org>
AuthorDate: 2024-05-05 16:23:43 +0000
Commit:     Tilman Keskinoz <arved@FreeBSD.org>
CommitDate: 2024-05-05 16:25:12 +0000

    net/dhcpd: fix build on 15-CURRENT

    PR:             275313
    Reported by:    Mallorya@fastmail.com
    Submitted by:   maintainer

 net/dhcpd/Makefile                    |  2 +-
 net/dhcpd/files/patch-pfutils.c (new) | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 1 deletion(-)