Fails to compile due to missing include of cstring in Kernel/Operation_Broadcast.cpp
Trying to compile getdp from source (on an Ubuntu 20.04 system) fails due to a missing include of <cstring>
in Kernel/Operation_Broadcast.cpp
.
How to reproduce:
git clone https://gitlab.onelab.info/getdp/getdp.git
cd getdp
mkdir build
cd build
cmake ..
make -j4
This will result in the following error message:
/tmp/getdp/Kernel/Operation_Broadcast.cpp:60:15: error: ‘strncpy’ was not declared in this scope
60 | strncpy(sidj, s, sizeof(sidj));
| ^~~~~~~
/tmp/getdp/Kernel/Operation_Broadcast.cpp:25:1: note: ‘strncpy’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
Adding the line #include <cstring>
in the beginning of Kernel/Operation_Broadcast.cpp
will indeed fix the problem.