[pacman-dev] balpm: set handle->parallel_downloads only with curl

Message ID 20210112132459.104727-1-emil.l.velikov@gmail.com
State New
Headers show
Series [pacman-dev] balpm: set handle->parallel_downloads only with curl | expand

Commit Message

Emil Velikov Jan. 12, 2021, 1:24 p.m. UTC
The variable is missing when building without curl. Move it within the
ifdef guard.

Fixes: 9dc29ebf ("libalpm: set parallel_downloads to 1 when creating the handle")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
Noticed while skimming through now the parallel downloader works.
Might be a good idea to add as a CI permutation as/if we move to gitlab.
---
 lib/libalpm/alpm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 85cc4618..9504d4ca 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -73,9 +73,8 @@  alpm_handle_t SYMEXPORT *alpm_initialize(const char *root, const char *dbpath,
 #ifdef HAVE_LIBCURL
 	curl_global_init(CURL_GLOBAL_ALL);
 	myhandle->curlm = curl_multi_init();
-#endif
-
 	myhandle->parallel_downloads = 1;
+#endif
 
 #ifdef ENABLE_NLS
 	bindtextdomain("libalpm", LOCALEDIR);