nixpkgs/pkgs/by-name/li/libtpms/0001-fix-march-x86-64-v4.patch
n0099 176cf4560c libtpms: fix building with -march=x86-64-v4
fix #528643
https://github.com/stefanberger/libtpms/pull/588

Co-Authored-By: Arthur Gautier <arthur.gautier@arista.com>
Not-cherry-picked-because: vendoring patch is required as `26.05` using tag `v0.10.2` as src, and the file being patched has been moved during `v0.10.2` and the PR's base: https://github.com/NixOS/nixpkgs/issues/528643#issuecomment-4666881282
2026-06-10 18:34:08 +00:00

17 lines
675 B
Diff

https://github.com/stefanberger/libtpms/pull/588
diff --git a/src/tpm2/AlgorithmTests.c b/src/tpm2/AlgorithmTests.c
index eca917d0..8cbc749b 100644
--- a/src/tpm2/AlgorithmTests.c
+++ b/src/tpm2/AlgorithmTests.c
@@ -197,8 +197,8 @@ TestSMAC(
//*** MakeIv()
// Internal function to make the appropriate IV depending on the mode.
static UINT32 MakeIv(TPM_ALG_ID mode, // IN: symmetric mode
- UINT32 size, // IN: block size of the algorithm
- BYTE* iv // OUT: IV to fill in
+ UINT32 size, // IN: block size of the algorithm
+ volatile BYTE* iv // OUT: IV to fill in; 'volatile' for gcc15
)
{
BYTE i;