coolxv / cpp-stub

C++ unit test stub(not mock) and awesome.Surpported ISA x86,x86-64,arm64,arm32,arm thumb,mips64,riscv,loongarch64.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation failure on Aarch64 Fedora Linux because of missing `#include <cstdint>`

jiridanek opened this issue · comments

https://download.copr.fedorainfracloud.org/results/jdanek/skupper-router/fedora-rawhide-aarch64/03820885-skupper-router/builder-live.log.gz

/builddir/build/BUILD/skupper-router/tests/cpp-stub/cpp_stub.h:47:11: error: 'uint32_t' was not declared in this scope
   47 |         ((uint32_t*)fn)[0] = 0x58000040 | 9;\
      |           ^~~~~~~~
/builddir/build/BUILD/skupper-router/tests/cpp-stub/cpp_stub.h:248:13: note: in expansion of macro 'REPLACE_FAR'
  248 |             REPLACE_FAR(this, fn, fn_stub);
      |             ^~~~~~~~~~~
/builddir/build/BUILD/skupper-router/tests/cpp-stub/cpp_stub.h:26:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
   25 | #include <map>
  +++ |+#include <cstdint>

The above is my copy of the files. The corresponding lines in this project are at

cpp-stub/src/stub.h

Lines 40 to 41 in 691b625

((uint32_t*)fn)[0] = 0x58000040 | 9;\
((uint32_t*)fn)[1] = 0xd61f0120 | (9 << 5);\