FreeBSD-13-STABLE: lib/libsecureboot/verify_file.c: error: use of undeclared identifier 'SOPEN_MAX'

From: FreeBSD User <freebsd_at_walstatt-de.de>
Date: Fri, 3 Sep 2021 17:59:55 +0200
Hello,

enabling 

WITH_BEARSSL 

in src.conf renders buildworld on 13-STABLE to fail, but not on
14-CURRENT. 



This is the difference between the sources, obviously 14-CURRENT contains the correct
definition of SOPEN_MAX, while 13-STABLE not (undefinied SOPNE_MAX triggers the compiler to
fail, 
/usr/src/lib/libsecureboot/verify_file.c:59:22: error: use of undeclared identifier
'SOPEN_MAX'), see

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258211


[...]
13-STABLE
:/pool/sources/13-STABLE/src # grep -r SOPEN_MAX .
./lib/libsecureboot/tests/Makefile:XCFLAGS.verify_file += -DSOPEN_MAX=64
./lib/libsecureboot/verify_file.c:static int ve_status[SOPEN_MAX+1];
./lib/libsecureboot/verify_file.c:      if (fd >= 0 && fd < SOPEN_MAX) {
./lib/libsecureboot/verify_file.c:      ve_status[SOPEN_MAX] = ves;
./lib/libsecureboot/verify_file.c: *    _at_li ve_status[SOPEN_MAX] if ve_status_state is none
./lib/libsecureboot/verify_file.c:              fd >= 0 && fd < SOPEN_MAX)
./lib/libsecureboot/verify_file.c:      return (ve_status[SOPEN_MAX]);  /* most recent */

[...]
14-CURRENT
./lib/libsecureboot/tests/Makefile:XCFLAGS.verify_file += -DSOPEN_MAX=64
./lib/libsecureboot/verify_file.c:#ifndef SOPEN_MAX
./lib/libsecureboot/verify_file.c:#define       SOPEN_MAX       64
./lib/libsecureboot/verify_file.c:static int ve_status[SOPEN_MAX+1];
./lib/libsecureboot/verify_file.c:      if (fd >= 0 && fd < SOPEN_MAX) {
./lib/libsecureboot/verify_file.c:      ve_status[SOPEN_MAX] = ves;
./lib/libsecureboot/verify_file.c: *    _at_li ve_status[SOPEN_MAX] if ve_status_state is none
./lib/libsecureboot/verify_file.c:              fd >= 0 && fd < SOPEN_MAX)
./lib/libsecureboot/verify_file.c:      return (ve_status[SOPEN_MAX]);  /* most recent */




-- 
O. Hartmann
Received on Fri Sep 03 2021 - 15:59:55 UTC

Original text of this message