diff --git a/lib/cf-socket.c b/lib/cf-socket.c index a6a609f7b5..09fa60ad2a 100644 --- a/lib/cf-socket.c +++ b/lib/cf-socket.c @@ -53,6 +53,11 @@ #include #endif +#ifdef __DragonFly__ +/* Required for __DragonFly_version */ +#include +#endif + #include "urldata.h" #include "bufq.h" #include "sendf.h" @@ -137,8 +142,9 @@ static void nosigpipe(struct Curl_easy *data, #define nosigpipe(x,y) Curl_nop_stmt #endif -#if defined(__DragonFly__) || defined(USE_WINSOCK) -/* DragonFlyBSD and Windows use millisecond units */ +#if defined(USE_WINSOCK) || \ + (defined(__DragonFly__) && __DragonFly_version < 500702) +/* DragonFlyBSD < 500702 and Windows use millisecond units */ #define KEEPALIVE_FACTOR(x) (x *= 1000) #else #define KEEPALIVE_FACTOR(x)