From: Johannes Sixt Date: Tue, 18 Aug 2009 07:15:57 GMT Subject: [PATCH] block-sha1: Windows declares ntohl() in winsock2.h Message-ID: <4A8A552D.6020407@viscovery.net> From: Johannes Sixt This is a minimal fix to compile block-sha1 on Windows. I did not do any benchmarks whether the implementation of ntohl() is actually faster than bytewise access and shifts. Signed-off-by: Johannes Sixt --- I would appreciate if our Windows experts could tell whether the implementation of ntohl/htonl is worth its money or whether we should go with the generic byte access plus shifts. the function call over block-sha1/sha1.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c index a1228cf..67c1ee8 100644 --- a/block-sha1/sha1.c +++ b/block-sha1/sha1.c @@ -7,7 +7,11 @@ */ #include +#ifndef _WIN32 #include +#else +#include +#endif #include "sha1.h" -- 1.6.4.1179.g9a91.dirty