From 51ea55190b6e72c77c96754c1bf2f149a4714848 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Tue, 18 Aug 2009 15:26:55 -0400 Subject: make sure byte swapping is optimal for git We rely on ntohl() and htonl() to perform byte swapping in many places. However, some platforms have libraries providing really poor implementations of those which might cause significant performance issues, especially with the block-sha1 code. Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- block-sha1/sha1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'block-sha1') diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c index 464cb258aa..d31f2e386c 100644 --- a/block-sha1/sha1.c +++ b/block-sha1/sha1.c @@ -4,8 +4,8 @@ * and to avoid unnecessary copies into the context array. */ -#include -#include +/* this is only to get definitions for memcpy(), ntohl() and htonl() */ +#include "../git-compat-util.h" #include "sha1.h" -- cgit v1.2.3