aarond10 / https_dns_proxy

A lightweight DNS-over-HTTPS proxy.
MIT License
775 stars 114 forks source link

Fix segmentation fault by adding missing <string.h> #108

Closed tengattack closed 3 years ago

tengattack commented 3 years ago

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.

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