Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38648 )
Change subject: util/cbfstool: extend includes in commonlib ......................................................................
Patch Set 1: Code-Review-1
Sorry for breaking your build and we should definitely get it fixed, but I'm not really sure this is a great solution. As we add more files to commonlib I wouldn't really want every single one of them be littered with #ifdef __FreeBSD__ guards.
Would it be too hacky if we just add a -I/usr/include/sys into the cbfstool TOOLCPPFLAGS (maybe guarded by a check for FreeBSD)? I don't think it should do much harm.
Alternatively, I'd propose to centralize all these includes in a <commonlib/bsd/sysincludes.h> header so we only need all the #ifdef stuff in a single file.