summaryrefslogtreecommitdiff
path: root/harmony/git/0001-gc-use-s-type-character-for-fscanf.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-27 14:34:02 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-27 14:34:02 -0600
commit7553795ec2d735c01dbdde129a65b7f45d5aa999 (patch)
treeb3970009a8246b0c17a105fe6b10c8077fc2b763 /harmony/git/0001-gc-use-s-type-character-for-fscanf.patch
parente2b01859c88d221992403d1293d42da33002be4d (diff)
downloadpackages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.gz
packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.bz2
packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.xz
packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.zip
Add harmony/ repo for packages still being discussed
See https://wiki.adelielinux.org/wiki/Project:Harmony
Diffstat (limited to 'harmony/git/0001-gc-use-s-type-character-for-fscanf.patch')
-rw-r--r--harmony/git/0001-gc-use-s-type-character-for-fscanf.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/harmony/git/0001-gc-use-s-type-character-for-fscanf.patch b/harmony/git/0001-gc-use-s-type-character-for-fscanf.patch
new file mode 100644
index 000000000..e3fe78cf6
--- /dev/null
+++ b/harmony/git/0001-gc-use-s-type-character-for-fscanf.patch
@@ -0,0 +1,33 @@
+From afceb0f7755a87d0dd2194e95f26c9dc8f4bc688 Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Fri, 15 Sep 2017 23:55:57 -0500
+Subject: [PATCH] gc: use 's' type character for fscanf
+
+The ISO C standard states that using a field width together with the 'c'
+type character will read the exact amount specified; if that amount of
+bytes is not available, a match error occurs.
+
+This patch allows the t6500 test to pass on the musl libc, and `git gc`
+to behave correctly on systems utilising musl.
+
+Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
+---
+ builtin/gc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/builtin/gc.c b/builtin/gc.c
+index 3c78fcb..bb2d6c1 100644
+--- a/builtin/gc.c
++++ b/builtin/gc.c
+@@ -258,7 +258,7 @@ static const char *lock_repo_for_gc(int force, pid_t* ret_pid)
+ int should_exit;
+
+ if (!scan_fmt)
+- scan_fmt = xstrfmt("%s %%%dc", "%"SCNuMAX, HOST_NAME_MAX);
++ scan_fmt = xstrfmt("%s %%%ds", "%"SCNuMAX, HOST_NAME_MAX);
+ fp = fopen(pidfile_path, "r");
+ memset(locking_host, 0, sizeof(locking_host));
+ should_exit =
+--
+2.10.0
+