From 7c15bef6c732896d9ffb883fb1480fcd60c94a50 Mon Sep 17 00:00:00 2001 From: Imre Kaloz Date: Wed, 29 Apr 2015 14:49:58 +0200 Subject: [PATCH] avoid using libc's internal sys/cdefs.h sha1.h simply shouldn't use it while sha1.c simply doesn't Signed-off-by: Imre Kaloz --- sha1.c | 1 - sha1.h | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sha1.c b/sha1.c index 1db9134..e2e29cf 100644 --- a/sha1.c +++ b/sha1.c @@ -17,7 +17,6 @@ #define SHA1HANDSOFF /* Copies data before messing with it. */ -#include #include #include #include diff --git a/sha1.h b/sha1.h index 13328d3..80f6c2d 100644 --- a/sha1.h +++ b/sha1.h @@ -10,7 +10,6 @@ #define _SYS_SHA1_H_ #include -#include #include #define SHA1_DIGEST_LENGTH 20 @@ -22,11 +21,15 @@ typedef struct { u_char buffer[64]; } SHA1_CTX; -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif void SHA1Transform(uint32_t[5], const u_char[64]); void SHA1Init(SHA1_CTX *); void SHA1Update(SHA1_CTX *, const u_char *, u_int); void SHA1Final(u_char[SHA1_DIGEST_LENGTH], SHA1_CTX *); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif /* _SYS_SHA1_H_ */