blob: 5e98fdf3ff6f14143936a81bee24da3ca0e88672 (
plain)
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
|
$NetBSD: patch-ah,v 1.6 2005/07/30 10:40:27 markd Exp $
--- kwallet/backend/sha1.cc.orig 2005-05-24 00:16:08.000000000 +1200
+++ kwallet/backend/sha1.cc
@@ -19,6 +19,12 @@
*/
#include <config.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h> /* For uintXX_t on Tru64 */
+#endif
#include "sha1.h"
#include <string.h>
@@ -307,7 +313,7 @@ const unsigned char *SHA1::hash() {
p = _buf;
#ifdef WORDS_BIGENDIAN
-#define X(a) do { *(unsigned long *)p = _h##a; p += 4; } while (0)
+#define X(a) do { *(uint32_t *)p = _h##a; p += 4; } while (0)
#else
#define X(a) do { *p++ = _h##a >> 24; *p++ = _h##a >> 16; \
*p++ = _h##a >> 8; *p++ = _h##a; } while (0)
|