Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ using ssize_t = long;

using socket_t = SOCKET;
using socklen_t = int;
#define poll(fds, nfds, timeout) WSAPoll(fds, nfds, timeout)

#else // not _WIN32

Expand Down Expand Up @@ -2660,7 +2659,9 @@ inline bool is_field_value(const std::string &s) { return is_field_content(s); }
/*
* Implementation that will be part of the .cc file if split into .h + .cc.
*/

#if defined(_WIN32)
#define poll(fds, nfds, timeout) WSAPoll(fds, nfds, timeout)
#endif
namespace detail {

inline bool is_hex(char c, int &v) {
Expand Down Expand Up @@ -10372,13 +10373,13 @@ inline SSL_CTX *Client::ssl_context() const {
return nullptr;
}
#endif

#ifdef _WIN32
#undef poll
#endif
// ----------------------------------------------------------------------------

} // namespace httplib

#ifdef _WIN32
#undef poll
#endif


#endif // CPPHTTPLIB_HTTPLIB_H