Merge pull request #256554 from sshilovsky/master

curlftpfs: apply SUSE patches
This commit is contained in:
Weijia Wang 2023-09-24 14:09:42 +02:00 committed by GitHub
commit f7f67c9c1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 0 deletions

View file

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
# it is known to cause problems. Search online for "rpl_malloc" and
# "rpl_realloc" to find out more.
./fix-rpl_malloc.patch
./suse-bug-580609.patch
./suse-bug-955687.patch
];
nativeBuildInputs = [ autoreconfHook pkg-config ];

View file

@ -0,0 +1,10 @@
--- a/ftpfs.c 2008-04-30 01:05:47.000000000 +0200
+++ b/ftpfs.c 2010-05-21 13:01:42.569006163 +0200
@@ -503,7 +503,6 @@ static void *ftpfs_write_thread(void *da
curl_easy_setopt_or_die(fh->write_conn, CURLOPT_URL, fh->full_path);
curl_easy_setopt_or_die(fh->write_conn, CURLOPT_UPLOAD, 1);
- curl_easy_setopt_or_die(fh->write_conn, CURLOPT_INFILESIZE, -1);
curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READFUNCTION, write_data_bg);
curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READDATA, fh);
curl_easy_setopt_or_die(fh->write_conn, CURLOPT_LOW_SPEED_LIMIT, 1);

View file

@ -0,0 +1,11 @@
--- a/ftpfs.c
+++ b/ftpfs.c
@@ -614,6 +614,8 @@ static void free_ftpfs_file(struct ftpfs
sem_destroy(&fh->data_need);
sem_destroy(&fh->data_written);
sem_destroy(&fh->ready);
+ if (fh->buf.size) { buf_free(&fh->buf); }
+ if (fh->stream_buf.size) { buf_free(&fh->stream_buf); }
free(fh);
}