Commit 20a14a42a25f72e379f38460b8a8484667536795
Committed by
Wolfgang Denk
1 parent
f297b7a1ec
Exists in
master
and in
54 other branches
Rename include/md5.h to include/u-boot/md5.h
Some systems have md5.h installed in /usr/include/. This isn't the desired file (we want the one in include/md5.h). This will avoid the conflict. This fixes the host tools building problem by creating a new directory for U-Boot specific header files. [Patch by Andy Fleming, modified to use separate directory by Wolfgang Denk] Signed-off-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Andy Fleming <afleming@freescale.com> Acked-by: Timur Tabi <timur@freescale.com>
Showing 3 changed files with 26 additions and 3 deletions Side-by-side Diff
common/image.c
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | #endif |
54 | 54 | |
55 | 55 | #if defined(CONFIG_FIT) |
56 | -#include <md5.h> | |
56 | +#include <u-boot/md5.h> | |
57 | 57 | #include <sha1.h> |
58 | 58 | |
59 | 59 | static int fit_check_ramdisk (const void *fit, int os_noffset, |
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | int verify); |
71 | 71 | #else |
72 | 72 | #include "mkimage.h" |
73 | -#include <md5.h> | |
73 | +#include <u-boot/md5.h> | |
74 | 74 | #include <time.h> |
75 | 75 | #include <image.h> |
76 | 76 | #endif /* !USE_HOSTCC*/ |
include/u-boot/md5.h
1 | +/* | |
2 | + * This file was transplanted with slight modifications from Linux sources | |
3 | + * (fs/cifs/md5.h) into U-Boot by Bartlomiej Sieka <tur@semihalf.com>. | |
4 | + */ | |
5 | + | |
6 | +#ifndef _MD5_H | |
7 | +#define _MD5_H | |
8 | + | |
9 | +#include <linux/types.h> | |
10 | + | |
11 | +struct MD5Context { | |
12 | + __u32 buf[4]; | |
13 | + __u32 bits[2]; | |
14 | + unsigned char in[64]; | |
15 | +}; | |
16 | + | |
17 | +/* | |
18 | + * Calculate and store in 'output' the MD5 digest of 'len' bytes at | |
19 | + * 'input'. 'output' must have enough space to hold 16 bytes. | |
20 | + */ | |
21 | +void md5 (unsigned char *input, int len, unsigned char output[16]); | |
22 | + | |
23 | +#endif /* _MD5_H */ |