Idwer Vollering has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38648 )
Change subject: util/cbfstool: extend includes in commonlib ......................................................................
Patch Set 1:
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.
I'm open for suggestions. So far, adding 'TOOLCPPFLAGS += -include /usr/include/sys/endian.h' and/or 'TOOLCPPFLAGS += -I/usr/include/sys' while leaving lz4_wrapper.c (where it had the ifdef guard to use sys/endian.h instead) untouched seems to not be working.