On 2024-10-10 15:12, Morten Brørup wrote:
From: Morten Brørup [mailto:m...@smartsharesystems.com]
Sent: Thursday, 10 October 2024 13.48

From: Mattias Rönnblom [mailto:hof...@lysator.liu.se]
Sent: Thursday, 10 October 2024 12.40

On 2024-10-10 00:15, Morten Brørup wrote:
From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com]
Sent: Wednesday, 18 September 2024 10.26



  From what I can read on the internet, max_align_t is missing in
stddef.h in MSVC [1], so try adding this to fix the Windows CI
compilation failure:

#ifdef RTE_TOOLCHAIN_MSVC
#include <cstddef>
#endif

Please excuse my MSVC ignorance, but will this work in C? Looks like
C++.

I have no clue. Just parroting what Microsoft says on the internet.

You can try it out and see if the CI accepts it.

Alternative hack...
Add typedef, based on MS source code [2]:

#ifdef RTE_TOOLCHAIN_MSVC
typedef double max_align_t;
#endif

[2]: https://github.com/microsoft/STL/blob/main/stl/inc/cstddef#L30


That will break the day Microsoft fixes this bug.




[1]: https://learn.microsoft.com/en-
ie/answers/questions/1726147/why-
max-align-t-not-defined-in-stddef-h-in-windows


I would like to see this series go into 24.11, and then it needs to
work for MSVC too.

@Tyler, any better suggestions for fixing the missing max_align_t in
stddef.h?


Reply via email to