Skip to content

Commit 9e7861b

Browse files
Copilotyhirose
andauthored
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>
1 parent 27ee115 commit 9e7861b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

httplib.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ using socklen_t = int;
257257
#include <netinet/in.h>
258258
#ifdef __linux__
259259
#include <resolv.h>
260+
#undef _res // Undefine _res macro to avoid conflicts with user code (#2278)
260261
#endif
261262
#include <csignal>
262263
#include <netinet/tcp.h>

0 commit comments

Comments
 (0)