← Commit list

65714f8130

Daniel Stenberg
Daniel Stenberg
2026-01-15
SUCCESS Duration: 342s

Subject

easy: fix build with --disable-form-api and --disable-mime

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/easy.c+4 -1
@@ -891,8 +891,9 @@ static CURLcode dupset(struct Curl_easy *dst, struct Curl_easy *src)
/* Copy src->set into dst->set first, then deal with the strings
afterwards */
dst->set = src->set;
+#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
dst->set.mimepostp = NULL;
-
+#endif
/* clear all dest string and blob pointers first, in case we error out
mid-function */
memset(dst->set.str, 0, STRING_LAST * sizeof(char *));
@@ -927,6 +928,7 @@ static CURLcode dupset(struct Curl_easy *dst, struct Curl_easy *src)
dst->set.postfields = dst->set.str[i];
}
+#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
if(src->set.mimepostp) {
/* Duplicate mime data. Get a mimepost struct for the clone as well */
dst->set.mimepostp = curlx_malloc(sizeof(*dst->set.mimepostp));
@@ -938,6 +940,7 @@ static CURLcode dupset(struct Curl_easy *dst, struct Curl_easy *src)
if(result)
return result;
}
+#endif
if(src->set.resolve)
dst->state.resolve = dst->set.resolve;
lib/url.c+2 -0
@@ -175,8 +175,10 @@ void Curl_freeset(struct Curl_easy *data)
Curl_bufref_free(&data->state.referer);
Curl_bufref_free(&data->state.url);
+#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
Curl_mime_cleanpart(data->set.mimepostp);
Curl_safefree(data->set.mimepostp);
+#endif
#ifndef CURL_DISABLE_COOKIES
curl_slist_free_all(data->state.cookielist);