clamav/clamav-curl.patch

57 lines
2.5 KiB
Diff
Raw Normal View History

diff -up clamav-0.102.2/clamonacc/client/communication.c.curl clamav-0.102.2/clamonacc/client/communication.c
--- clamav-0.102.2/clamonacc/client/communication.c.curl 2020-02-04 07:59:26.000000000 -0700
+++ clamav-0.102.2/clamonacc/client/communication.c 2020-04-29 21:44:45.073020203 -0600
@@ -42,12 +42,12 @@
#include "communication.h"
-static int onas_socket_wait(curl_socket_t sockfd, int32_t b_recv, uint64_t timeout_ms);
+static int onas_socket_wait(long sockfd, int32_t b_recv, uint64_t timeout_ms);
/**
* Function from curl example code, Copyright (C) 1998 - 2018, Daniel Stenberg, see COPYING.curl for license details
*/
-static int onas_socket_wait(curl_socket_t sockfd, int32_t b_recv, uint64_t timeout_ms)
+static int onas_socket_wait(long sockfd, int32_t b_recv, uint64_t timeout_ms)
{
struct timeval tv;
fd_set infd, outfd, errfd;
@@ -79,9 +79,9 @@ int onas_sendln(CURL *curl, const void *
{
size_t sent = 0;
CURLcode curlcode;
- curl_socket_t sockfd;
+ long sockfd;
- curlcode = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
+ curlcode = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd);
if (CURLE_OK != curlcode) {
logg("!ClamCom: could not get curl active socket info %s\n", curl_easy_strerror(curlcode));
@@ -137,9 +137,9 @@ int onas_recvln(struct RCVLN *rcv_data,
{
char *eol;
int ret = 0;
- curl_socket_t sockfd;
+ long sockfd;
- rcv_data->curlcode = curl_easy_getinfo(rcv_data->curl, CURLINFO_ACTIVESOCKET, &sockfd);
+ rcv_data->curlcode = curl_easy_getinfo(rcv_data->curl, CURLINFO_LASTSOCKET, &sockfd);
if (CURLE_OK != rcv_data->curlcode) {
logg("!ClamCom: could not get curl active socket info %s\n", curl_easy_strerror(rcv_data->curlcode));
diff -up clamav-0.102.2/m4/reorganization/libs/curl.m4.curl clamav-0.102.2/m4/reorganization/libs/curl.m4
--- clamav-0.102.2/m4/reorganization/libs/curl.m4.curl 2020-02-04 07:59:26.000000000 -0700
+++ clamav-0.102.2/m4/reorganization/libs/curl.m4 2020-04-29 21:36:15.043808045 -0600
@@ -62,8 +62,8 @@ if test "X$have_curl" = "Xyes"; then
dnl end of section
AM_COND_IF([BUILD_CLAMONACC],
- dnl if version greater than (7.45)
- [if test $curl_version -ge 470272 ; then
+ dnl if version greater than (7.29)
+ [if test $curl_version -ge 466176 ; then
$enable_clamonacc="yes"
else
AC_MSG_ERROR([m4_normalize([