From 31c1a504493708ec64539e39ae23106cfce92d36 Mon Sep 17 00:00:00 2001
From: Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
Date: Fri, 7 Apr 2017 14:51:39 +0000
Subject: [PATCH] support older libcurl versions (< 7.42.0) (fixes #86)

---
 lib/advio.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/advio.c b/lib/advio.c
index f2d942394..df1a05642 100644
--- a/lib/advio.c
+++ b/lib/advio.c
@@ -79,7 +79,9 @@ AFILE * afopen(const char *uri, const char *mode)
 		goto out1;
 
 	/* Setup libcurl handle */
+#if LIBCURL_VERSION_NUM >= 0x072d00
 	curl_easy_setopt(af->curl, CURLOPT_DEFAULT_PROTOCOL, "file");
+#endif
 	curl_easy_setopt(af->curl, CURLOPT_FOLLOWLOCATION, 1L);
 	curl_easy_setopt(af->curl, CURLOPT_UPLOAD, 0L);
 	curl_easy_setopt(af->curl, CURLOPT_USERAGENT, USER_AGENT);