[Bug 260082] sbin/ping fails if WITHOUT_INET and WITHOUT_INET6 are set

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 27 Nov 2021 23:11:35 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260082

            Bug ID: 260082
           Summary: sbin/ping fails if WITHOUT_INET and WITHOUT_INET6 are
                    set
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: editor@callfortesting.org

This commit appears to cause sbin/ping to fail of both the WITHOUT_INET and
WITHOUT_INET6 build options are set:

https://github.com/freebsd/freebsd-src/commit/9ce201f2ee3ca340032d9cc71d91a36b3b45a4c3#diff-07afc5f05fc4879c80f36cee3bf6fdb5f19d233084824b8f517c18d205f6d23f

The error:

cc -target x86_64-unknown-freebsd14.0
--sysroot=/usr/obj/usr/src/amd64.amd64/tmp
 -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin  -O2 -pipe -fno-common -DORDER  
-DN
DEBUG -MD  -MF.depend.ealloc.o -MTealloc.o -std=gnu99 -Wno-format-zero-length
-n
obuiltininc -idirafter /usr/lib/clang/11.0.1/include -Qunused-arguments   -c
/us
r/src/sbin/rcorder/ealloc.c -o ealloc.o
--- all_subdir_sbin/ping ---
/usr/src/sbin/ping/main.c:83:38: error: expected ')'
        while ((ch = getopt(argc, argv, ":" OPTSTR)) != -1) {
                                            ^
/usr/src/sbin/ping/main.c:83:21: note: to match this '('
        while ((ch = getopt(argc, argv, ":" OPTSTR)) != -1) {
                           ^
1 error generated.

Reverting to the previous commit of /usr/src/sbin/ping/main.c does not produce
the error.

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