From ba7a7c2201cd3f40389214c5f544e352d728aa95 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Sat, 18 Feb 2023 21:17:11 -0700 Subject: [PATCH] binpac: Include stdint.h early to prevent redefinition of int type macros --- tools/binpac/src/pac_scan.ll | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/binpac/src/pac_scan.ll b/tools/binpac/src/pac_scan.ll index 449403d76d..e3b35d3663 100644 --- a/tools/binpac/src/pac_scan.ll +++ b/tools/binpac/src/pac_scan.ll @@ -1,3 +1,11 @@ +%top{ +// Include stdint.h at the start of the generated file. Typically +// MSVC will include this header later, after the definitions of +// the integral type macros. MSVC then complains that about the +// redefinition of the types. Including stdint.h early avoids this. +#include +} + %{ #include "pac_action.h" #include "pac_array.h"