aboutsummaryrefslogtreecommitdiff
path: root/net-p2p/bnbt
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
parent39ec5fa28748095d0162181072af7c1cc15bd19b (diff)
downloadports-df9b24e2e2451f4aa3073a209b68aeddce13c41d.tar.gz
ports-df9b24e2e2451f4aa3073a209b68aeddce13c41d.zip
Notes
Diffstat (limited to 'net-p2p/bnbt')
-rw-r--r--net-p2p/bnbt/Makefile1
-rw-r--r--net-p2p/bnbt/files/patch-sha1.cpp32
-rw-r--r--net-p2p/bnbt/files/patch-sha1.h31
3 files changed, 64 insertions, 0 deletions
diff --git a/net-p2p/bnbt/Makefile b/net-p2p/bnbt/Makefile
index 08fdf7576999..a6c0557f6aac 100644
--- a/net-p2p/bnbt/Makefile
+++ b/net-p2p/bnbt/Makefile
@@ -7,6 +7,7 @@
PORTNAME= bnbt
PORTVERSION= 8.5
+PORTREVISION= 1
CATEGORIES= net-p2p
MASTER_SITES= http://opensource.depthstrike.com/${PORTNAME}/
DISTNAME= ${SNAPSHOT}-${PORTNAME}${PORTVERSION:C/\.//}-src
diff --git a/net-p2p/bnbt/files/patch-sha1.cpp b/net-p2p/bnbt/files/patch-sha1.cpp
new file mode 100644
index 000000000000..ab0df251a7a7
--- /dev/null
+++ b/net-p2p/bnbt/files/patch-sha1.cpp
@@ -0,0 +1,32 @@
+--- sha1.cpp 2009-06-30 14:02:51.000000000 -0700
++++ sha1.cpp.new 2009-06-30 14:02:47.000000000 -0700
+@@ -44,9 +44,9 @@
+ m_count[1] = 0;
+ }
+
+-void CSHA1::Transform(unsigned long state[5], const unsigned char buffer[64])
++void CSHA1::Transform(unsigned int state[5], const unsigned char buffer[64])
+ {
+- unsigned long a = 0, b = 0, c = 0, d = 0, e = 0;
++ unsigned int a = 0, b = 0, c = 0, d = 0, e = 0;
+
+ SHA1_WORKSPACE_BLOCK* block;
+ static unsigned char workspace[64];
+@@ -96,7 +96,7 @@
+ // Use this function to hash in binary data and strings
+ void CSHA1::Update(const unsigned char* data, unsigned int len)
+ {
+- unsigned long i = 0, j = 0;
++ unsigned int i = 0, j = 0;
+
+ j = (m_count[0] >> 3) & 63;
+
+@@ -123,7 +123,7 @@
+
+ void CSHA1::Final()
+ {
+- unsigned long i = 0, j = 0;
++ unsigned int i = 0, j = 0;
+ unsigned char finalcount[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ for (i = 0; i < 8; i++)
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___