summaryrefslogtreecommitdiff
path: root/net-p2p/bnbt/files/patch-sha1.h
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2009-07-15 13:43:54 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2009-07-15 13:43:54 +0000
commitdf9b24e2e2451f4aa3073a209b68aeddce13c41d (patch)
treea35ec29b928018722e9f527bbff6684cb6003bdf /net-p2p/bnbt/files/patch-sha1.h
parentUpdate net-p2p/rtorrent-devel to 0.8.5. (diff)
Fix SHA1 on 64bit architectures.
PR: ports/136197 Submitted by: Chris Cowart <ccowart@rescomp.berkeley.edu>
Notes
Notes: svn path=/head/; revision=237876
Diffstat (limited to 'net-p2p/bnbt/files/patch-sha1.h')
-rw-r--r--net-p2p/bnbt/files/patch-sha1.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/net-p2p/bnbt/files/patch-sha1.h b/net-p2p/bnbt/files/patch-sha1.h
new file mode 100644
index 000000000000..cfe3bbab2959
--- /dev/null
+++ b/net-p2p/bnbt/files/patch-sha1.h
@@ -0,0 +1,31 @@
+--- sha1.h 2009-06-30 14:02:51.000000000 -0700
++++ sha1.h.new 2009-06-30 14:02:47.000000000 -0700
+@@ -59,7 +59,7 @@
+
+ typedef union {
+ unsigned char c[64];
+- unsigned long l[16];
++ unsigned int l[16];
+ } SHA1_WORKSPACE_BLOCK;
+
+ // Two different formats for ReportHash(...)
+@@ -69,8 +69,8 @@
+ CSHA1();
+ virtual ~CSHA1();
+
+- unsigned long m_state[5];
+- unsigned long m_count[2];
++ unsigned int m_state[5];
++ unsigned int m_count[2];
+ unsigned char m_buffer[64];
+ unsigned char m_digest[20];
+
+@@ -86,7 +86,7 @@
+
+ private:
+ // Private SHA-1 transformation
+- void Transform(unsigned long state[5], const unsigned char buffer[64]);
++ void Transform(unsigned int state[5], const unsigned char buffer[64]);
+ };
+
+ #endif // ___SHA1_H___