summaryrefslogtreecommitdiff
path: root/www/curl
diff options
context:
space:
mode:
authormarino <marino>2012-07-20 08:22:04 +0000
committermarino <marino>2012-07-20 08:22:04 +0000
commit49923fc37f5c136cb9051b71241bd76aa4bc1011 (patch)
treec29376e016bab39fba8059376beb401090208a92 /www/curl
parentc0985de0b8d4176ab35f9aa8435a9e4ef6a466b3 (diff)
downloadpkgsrc-49923fc37f5c136cb9051b71241bd76aa4bc1011.tar.gz
www/curl: Fix TCP_KEEPIDLE unit for DragonFly
DragonFly uses millisecond rather than second as the unit of TCP_KEEPIDLE. Patch multiples obtained value by 1000 on DragonFly. Patch will be submitted to curl at SourceForge.
Diffstat (limited to 'www/curl')
-rw-r--r--www/curl/Makefile3
-rw-r--r--www/curl/distinfo3
-rw-r--r--www/curl/patches/patch-lib_connect.c29
3 files changed, 33 insertions, 2 deletions
diff --git a/www/curl/Makefile b/www/curl/Makefile
index 4897dd52f8a..b587e2e669a 100644
--- a/www/curl/Makefile
+++ b/www/curl/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.113 2012/05/29 14:58:05 wiz Exp $
+# $NetBSD: Makefile,v 1.114 2012/07/20 08:22:04 marino Exp $
DISTNAME= curl-7.26.0
CATEGORIES= www
+PKGREVISION= 1
MASTER_SITES= http://curl.haxx.se/download/ \
ftp://ftp.sunet.se/pub/www/utilities/curl/
EXTRACT_SUFX= .tar.bz2
diff --git a/www/curl/distinfo b/www/curl/distinfo
index 35527784bdf..7f4837cc696 100644
--- a/www/curl/distinfo
+++ b/www/curl/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.76 2012/05/29 14:58:05 wiz Exp $
+$NetBSD: distinfo,v 1.77 2012/07/20 08:22:04 marino Exp $
SHA1 (curl-7.26.0.tar.bz2) = c2e62eaace2407d377bf544d1f808aea6dddf64c
RMD160 (curl-7.26.0.tar.bz2) = 90d66cd2f77bf825ba01056f4f384ff74e7b04eb
Size (curl-7.26.0.tar.bz2) = 2422651 bytes
SHA1 (patch-aa) = 4c5c76b76dc3a43087fdd8edf0de522fde563b3f
+SHA1 (patch-lib_connect.c) = 58d9352a2628ffab12a41cdf1b409be198761e91
diff --git a/www/curl/patches/patch-lib_connect.c b/www/curl/patches/patch-lib_connect.c
new file mode 100644
index 00000000000..bc5f8e8c84b
--- /dev/null
+++ b/www/curl/patches/patch-lib_connect.c
@@ -0,0 +1,29 @@
+$NetBSD: patch-lib_connect.c,v 1.1 2012/07/20 08:22:04 marino Exp $
+
+DragonFly uses millisecond as the unit of TCP_KEEP{IDLE} rather than second
+Patch to be submitted upstream.
+
+--- lib/connect.c.orig 2012-04-25 15:29:20.000000000 +0000
++++ lib/connect.c
+@@ -105,6 +105,10 @@ tcpkeepalive(struct SessionHandle *data,
+ else {
+ #ifdef TCP_KEEPIDLE
+ optval = curlx_sltosi(data->set.tcp_keepidle);
++#ifdef __DragonFly__
++ /* DragonFlyBSD uses millisecond as KEEPIDLE unit */
++ optval *= 1000;
++#endif
+ if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE,
+ (void *)&optval, sizeof(optval)) < 0) {
+ infof(data, "Failed to set TCP_KEEPIDLE on fd %d\n", sockfd);
+@@ -112,6 +116,10 @@ tcpkeepalive(struct SessionHandle *data,
+ #endif
+ #ifdef TCP_KEEPINTVL
+ optval = curlx_sltosi(data->set.tcp_keepintvl);
++#ifdef __DragonFly__
++ /* DragonFlyBSD uses millisecond as KEEPINTVL unit */
++ optval *= 1000;
++#endif
+ if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL,
+ (void *)&optval, sizeof(optval)) < 0) {
+ infof(data, "Failed to set TCP_KEEPINTVL on fd %d\n", sockfd);