mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-30 13:00:42 +00:00
Add #undef _res after including resolv.h to prevent macro conflicts (#2280)
* Initial plan * Add #undef _res after including resolv.h to prevent macro conflicts Co-authored-by: yhirose <357397+yhirose@users.noreply.github.com> * Complete task - added #undef _res after resolv.h include Co-authored-by: yhirose <357397+yhirose@users.noreply.github.com> * Remove accidentally committed codeql build artifacts Co-authored-by: yhirose <357397+yhirose@users.noreply.github.com> * Add inline comment explaining why #undef _res is necessary Co-authored-by: yhirose <357397+yhirose@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: yhirose <357397+yhirose@users.noreply.github.com>
This commit is contained in:
1 parent
27ee115a60
commit
9e7861b0b4
1 file changed
+1
@@ -257,6 +257,7 @@ using socklen_t = int;
|
|||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <resolv.h>
|
#include <resolv.h>
|
||||||
|
#undef _res // Undefine _res macro to avoid conflicts with user code (#2278)
|
||||||
#endif
|
#endif
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
#include <netinet/tcp.h>
|
#include <netinet/tcp.h>
|
||||||
|
|||||||
Reference in new issue
Block a user