]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[build] Fix build failures with random versions of gcc
authorMichael Brown <mcb30@ipxe.org>
Wed, 27 Mar 2024 14:28:47 +0000 (14:28 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 27 Mar 2024 14:28:47 +0000 (14:28 +0000)
commit37850e0e854292d074c2d35d18d7bb78d8e6ff85
tree39b0581719832b892a925706be0af3cbf6768137
parent9bbe77669c6e2b71826449d854f5aa0e2cee7767
[build] Fix build failures with random versions of gcc

For unknown reasons, miscellaneous versions of gcc seem to struggle
with the static assertions used to ensure the correct layout of the
GCM structures.

Adjust the assertions to use offsetof() rather than direct pointer
comparison, on the basis that offsetof() must be a compile-time
constant value.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/crypto/gcm.c
src/include/ipxe/gcm.h