diff --git a/litex/soc/software/include/base/inttypes.h b/litex/soc/software/include/base/inttypes.h index 4afd04b62..bc22376a6 100644 --- a/litex/soc/software/include/base/inttypes.h +++ b/litex/soc/software/include/base/inttypes.h @@ -24,7 +24,7 @@ #include -# if __WORDSIZE == 64 +# ifdef __LP64__ # define __PRI64_PREFIX "l" # define __PRIPTR_PREFIX "l" # else diff --git a/litex/soc/software/include/base/lfsr.h b/litex/soc/software/include/base/lfsr.h index 50dfccfc7..8326b811a 100644 --- a/litex/soc/software/include/base/lfsr.h +++ b/litex/soc/software/include/base/lfsr.h @@ -65,7 +65,7 @@ static inline unsigned long lfsr(unsigned long bits, unsigned long prev) 0x20000029, 0x48000000, 0x80200003, -#if __WORDSIZE == 64 +#ifdef __LP64__ 0x100080000, 0x204000003, 0x500000000,