+ case "${usergroup_phase}" in
+ local run_cmd
+ run_cmd=run_su
+ shift
+ run_su /usr/pkg/bin/bmake all BATCH=1 DEPENDS_TARGET=/nonexistent WRKLOG=/tmp/bulklog/lockf-1/work.log
+ su pbulk -c '"$@"' make /usr/pkg/bin/bmake all BATCH=1 DEPENDS_TARGET=/nonexistent WRKLOG=/tmp/bulklog/lockf-1/work.log
===> Building for lockf-1
cd /home/pbulk/build/sysutils/lockf/work;  echo "cc -o lockf lockf.c";  cc  -pipe -O2     -Wl,-zrelro -Wl,-R/usr/pkg/lib -o lockf lockf.c
cc -o lockf lockf.c
lockf.c: In function ‘acquire_lock’:
lockf.c:167:47: error: ‘O_EXLOCK’ undeclared (first use in this function); did you mean ‘F_EXLCK’?
  167 |         if ((fd = open(name, O_RDONLY|O_CREAT|O_EXLOCK|flags, 0666)) == -1) {
      |                                               ^~~~~~~~
      |                                               F_EXLCK
lockf.c:167:47: note: each undeclared identifier is reported only once for each function it appears in
lockf.c: In function ‘cleanup’:
lockf.c:183:17: warning: implicit declaration of function ‘flock’ [-Wimplicit-function-declaration]
  183 |                 flock(lockfd, LOCK_UN);
      |                 ^~~~~
lockf.c: At top level:
lockf.c:206:17: error: expected ‘;’, ‘,’ or ‘)’ before ‘__unused’
  206 | timeout(int sig __unused)
      |                 ^~~~~~~~
lockf.c: In function ‘wait_for_lock’:
lockf.c:230:39: error: ‘O_EXLOCK’ undeclared (first use in this function); did you mean ‘F_EXLCK’?
  230 |         if ((fd = open(name, O_RDONLY|O_EXLOCK, 0666)) == -1) {
      |                                       ^~~~~~~~
      |                                       F_EXLCK
lockf.c: At top level:
lockf.c:43:13: warning: ‘timeout’ used but never defined
   43 | static void timeout(int sig);
      |             ^~~~~~~
*** Error code 1

Stop.
bmake[1]: stopped in /data/jenkins/workspace/pkgsrc-el9-trunk-x86_64/sysutils/lockf
*** Error code 1

Stop.
bmake: stopped in /data/jenkins/workspace/pkgsrc-el9-trunk-x86_64/sysutils/lockf