Hi, I found the strerror() cannot work properly to return the information corresponded to the errno value (segmentation fault).
Therefore, I add the <string.h> header for solving the build warning and the more important thing is to fix the segmentation fault as stderror's result requires string.h included.
Hi, I found the
strerror()
cannot work properly to return the information corresponded to the errno value (segmentation fault).Therefore, I add the
<string.h>
header for solving the build warning and the more important thing is to fix the segmentation fault asstderror
's result requiresstring.h
included.Ref: https://stackoverflow.com/questions/17174081/why-cant-the-result-of-strerror-be-returned https://stackoverflow.com/questions/47112630/segmentation-fault-when-print-errno-for-shm-open-in-linux