Fix sha1 build for Windows

This works at least when cross compiling.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-02-15 19:53:07 -08:00
parent a0558a87b4
commit 0972d0c13e
2 changed files with 7 additions and 2 deletions

6
sha1.c
View file

@ -8,8 +8,12 @@
/* this is only to get definitions for memcpy(), ntohl() and htonl() */
#include <string.h>
#include <stdint.h>
#ifdef WIN32
#include <winsock2.h>
#else
#include <arpa/inet.h>
#endif
#include "sha1.h"
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))