File: 0002-Switch-to-libbsd-sha256sum-implementation.patch

package info (click to toggle)
mtree-netbsd 20180822-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 600 kB
  • sloc: ansic: 5,089; sh: 2,839; makefile: 42
file content (38 lines) | stat: -rw-r--r-- 960 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From: John Goerzen <jgoerzen@complete.org>
Date: Tue, 20 Dec 2022 07:22:23 +0000
Subject: Switch to libbsd sha256sum implementation

The libnbcompat one was causing incorrect results for some reason.
---
 compare.c | 3 ++-
 create.c  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/compare.c b/compare.c
index 0c9234a..3ec5ca9 100644
--- a/compare.c
+++ b/compare.c
@@ -90,7 +90,8 @@ __RCSID("$NetBSD: compare.c,v 1.7 2013/09/08 16:20:10 ryoon Exp $");
 #if HAVE_SHA2_H && HAVE_SHA512_FILE
 #include <sha2.h>
 #else
-#include <nbcompat/sha2.h>
+#include <sha256.h>
+#include <sha512.h>
 #endif
 #endif
 
diff --git a/create.c b/create.c
index 0dc51d5..7b088ca 100644
--- a/create.c
+++ b/create.c
@@ -111,7 +111,8 @@ __RCSID("$NetBSD: create.c,v 1.9 2013/09/08 16:20:10 ryoon Exp $");
 #if HAVE_SHA2_H && HAVE_SHA512_FILE
 #include <sha2.h>
 #else
-#include <nbcompat/sha2.h>
+#include <sha256.h>
+#include <sha512.h>
 #endif
 #endif