diff -urN a/extras/ext4_utils/sha1.c b/extras/ext4_utils/sha1.c --- a/extras/ext4_utils/sha1.c 2015-09-15 06:06:00.000000000 +0000 +++ b/extras/ext4_utils/sha1.c 2016-04-20 23:38:47.459902412 +0000 @@ -17,9 +17,6 @@ #define SHA1HANDSOFF /* Copies data before messing with it. */ -#ifndef USE_MINGW -#include -#endif #include #include #include diff -urN a/extras/ext4_utils/sha1.h b/extras/ext4_utils/sha1.h --- a/extras/ext4_utils/sha1.h 2015-09-15 06:06:00.000000000 +0000 +++ b/extras/ext4_utils/sha1.h 2016-04-21 08:05:20.406038068 +0000 @@ -17,11 +17,6 @@ typedef unsigned int uint32_t; typedef unsigned int u_int32_t; typedef unsigned int u_int; - -#define __BEGIN_DECLS -#define __END_DECLS -#else -#include #endif #define SHA1_DIGEST_LENGTH 20 @@ -33,11 +28,15 @@ 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_ */