aboutsummaryrefslogtreecommitdiff
path: root/block-sha1/sha1.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2009-08-18 15:26:55 -0400
committerJunio C Hamano <gitster@pobox.com>2009-08-18 14:16:37 -0700
commit51ea55190b6e72c77c96754c1bf2f149a4714848 (patch)
treea8f4a6fa1f05c0080c926432905e6e66ccbfadeb /block-sha1/sha1.c
parentd5f6a96fa4792f6143d06d9c0b572a96d7235305 (diff)
downloadgit-51ea55190b6e72c77c96754c1bf2f149a4714848.tar.gz
git-51ea55190b6e72c77c96754c1bf2f149a4714848.tar.xz
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 <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'block-sha1/sha1.c')
-rw-r--r--block-sha1/sha1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c
index 464cb258a..d31f2e386 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 <string.h>
-#include <arpa/inet.h>
+/* this is only to get definitions for memcpy(), ntohl() and htonl() */
+#include "../git-compat-util.h"
#include "sha1.h"