www/chromium: fails to biuld on 12.4-STABLE amd64

From: Tatsuki Makino <tatsuki_makino_at_hotmail.com>
Date: Mon, 13 Feb 2023 01:59:12 UTC
Hello.
The build of www/chromium was failing in the following.
This is an excerpt from a parallel build that had other outputs mixed in.

FAILED: obj/third_party/wayland/wayland_cursor/os-compatibility.o
cc -MMD -MF obj/third_party/wayland/wayland_cursor/os-compatibility.o.d -DUSE_AU
RA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGE
FILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DNDEBUG -DNV
ALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../.. -Igen -I../../third_party/waylan
d/include -I../../third_party/wayland/include/src -I../../third_party/wayland/sr
c/cursor -I../../third_party/wayland/src/egl -I../../third_party/wayland/src/src
 -I/usr/local/include/libepoll-shim -Igen/third_party/wayland/src/protocol -fno-
delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-si
ze=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC
-pthread -fcolor-diagnostics -fmerge-all-constants -m64 -msse3 -Xclang -fdebug-c
ompilation-dir -Xclang . -no-canonical-prefixes -ftrivial-auto-var-init=pattern
-O2 -fdata-sections -ffunction-sections -fno-unique-section-names -fno-omit-fram
e-pointer -g0 -fprofile-use=../../chrome/build/pgo_profiles/chrome-linux-5481-16
75162426-393d781cbc3753d814a299bfd43435032b5acfd9.profdata -Wno-profile-instr-un
profiled -Wno-profile-instr-out-of-date -Wno-backend-plugin -fvisibility=hidden
-Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wall -Wno-u
nused-variable -Wno-c++11-narrowing -Wno-missing-field-initializers -Wno-unused-
parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-c
ompare-conditional -Wno-ignored-pragma-optimize -Wno-macro-redefined -std=c11 -c
 ../../third_party/wayland/src/cursor/os-compatibility.c -o obj/third_party/wayl
and/wayland_cursor/os-compatibility.o
../../third_party/wayland/src/cursor/os-compatibility.c:127:7: warning:[81/7870]
 declaration of function 'memfd_create' is invalid in C99 [-Wimplicit-function-d
eclaration]
        fd = memfd_create("wayland-cursor", MFD_CLOEXEC | MFD_ALLOW_SEALING);
             ^
../../third_party/wayland/src/cursor/os-compatibility.c:127:38: error: use of un
declared identifier 'MFD_CLOEXEC'
        fd = memfd_create("wayland-cursor", MFD_CLOEXEC | MFD_ALLOW_SEALING);
                                            ^
../../third_party/wayland/src/cursor/os-compatibility.c:127:52: error: use of un
declared identifier 'MFD_ALLOW_SEALING'
        fd = memfd_create("wayland-cursor", MFD_CLOEXEC | MFD_ALLOW_SEALING);
                                                          ^
../../third_party/wayland/src/cursor/os-compatibility.c:135:13: error: use of un
declared identifier 'F_ADD_SEALS'
                fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL);
                          ^
../../third_party/wayland/src/cursor/os-compatibility.c:135:26: error: use of un
declared identifier 'F_SEAL_SHRINK'
                fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL);
                                       ^
../../third_party/wayland/src/cursor/os-compatibility.c:135:42: error: use of un
declared identifier 'F_SEAL_SEAL'
                fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL);
1 warning and 5 errors generated.

This is due to the fact that the patch in ${WRKSRC}/third_party/wayland/include/config.h is not concerned with HAVE_MEMFD_CREATE.
I don't know what to do about this on FreeBSD 12.4-STABLE amd64, so I just report it :)

Regards.