opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

0038-rsync-Pass-long-long-to-scan_scaled.patch (1164B)


      1 From 0e9ff28bc2e5bd4828b98b50333d12a6d24486fe Mon Sep 17 00:00:00 2001
      2 From: Michael Forney <mforney@mforney.org>
      3 Date: Wed, 27 Apr 2022 20:03:45 -0700
      4 Subject: [PATCH] rsync: Pass long long * to scan_scaled
      5 
      6 off_t might not be long long.
      7 ---
      8  usr.bin/rsync/main.c | 7 +++++--
      9  1 file changed, 5 insertions(+), 2 deletions(-)
     10 
     11 diff --git a/usr.bin/rsync/main.c b/usr.bin/rsync/main.c
     12 index dd175597914..5d7f055a9ae 100644
     13 --- a/usr.bin/rsync/main.c
     14 +++ b/usr.bin/rsync/main.c
     15 @@ -353,6 +353,7 @@ main(int argc, char *argv[])
     16  	struct fargs	*fargs;
     17  	char		**args;
     18  	const char	*errstr;
     19 +	long long	 size;
     20  
     21  	/* Global pledge. */
     22  
     23 @@ -488,12 +489,14 @@ basedir:
     24  			opts.basedir[basedir_cnt++] = optarg;
     25  			break;
     26  		case OP_MAX_SIZE:
     27 -			if (scan_scaled(optarg, &opts.max_size) == -1)
     28 +			if (scan_scaled(optarg, &size) == -1)
     29  				err(1, "bad max-size");
     30 +			opts.max_size = size;
     31  			break;
     32  		case OP_MIN_SIZE:
     33 -			if (scan_scaled(optarg, &opts.min_size) == -1)
     34 +			if (scan_scaled(optarg, &size) == -1)
     35  				err(1, "bad min-size");
     36 +			opts.max_size = size;
     37  			break;
     38  		case OP_VERSION:
     39  			fprintf(stderr, "openrsync: protocol version %u\n",
     40 -- 
     41 2.37.3
     42