curl: Fix build with MSVC
See https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1740#note_2895537 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8932>
This commit is contained in:
parent
ba87e0112f
commit
86ef06ddff
@ -234,7 +234,7 @@ gst_curl_file_sink_prepare_transfer (GstCurlBaseSink * basesink)
|
||||
if (last_slash != NULL) {
|
||||
/* create dir if file name contains dir component */
|
||||
gchar *dir_name = g_strndup (file_name, last_slash - file_name);
|
||||
if (g_mkdir_with_parents (dir_name, S_IRWXU) < 0) {
|
||||
if (g_mkdir_with_parents (dir_name, 0755) < 0) {
|
||||
basesink->error = g_strdup_printf ("failed to create directory '%s'",
|
||||
dir_name);
|
||||
g_free (file_name);
|
||||
|
@ -534,8 +534,8 @@ static gboolean
|
||||
url_contains_credentials (const gchar * url)
|
||||
{
|
||||
CURLUcode rc;
|
||||
g_autofree gchar *user = NULL;
|
||||
g_autofree gchar *pass = NULL;
|
||||
gchar *user = NULL;
|
||||
gchar *pass = NULL;
|
||||
CURLU *handle = NULL;
|
||||
|
||||
if (url == NULL) {
|
||||
@ -556,10 +556,14 @@ url_contains_credentials (const gchar * url)
|
||||
if (rc != CURLUE_OK)
|
||||
goto error;
|
||||
|
||||
curl_free (pass);
|
||||
curl_free (user);
|
||||
curl_url_cleanup (handle);
|
||||
return TRUE;
|
||||
|
||||
error:
|
||||
curl_free (pass);
|
||||
curl_free (user);
|
||||
curl_url_cleanup (handle);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -55,7 +55,9 @@
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user