mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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:
parent
a0558a87b4
commit
0972d0c13e
2 changed files with 7 additions and 2 deletions
3
Makefile
3
Makefile
|
@ -42,6 +42,7 @@ ifeq ($(CC), i686-w64-mingw32-gcc)
|
|||
LIBDIVECOMPUTERARCHIVE = $(shell $(PKGCONFIG) --libs libdivecomputer)
|
||||
RESFILE = packaging/windows/subsurface.res
|
||||
LDFLAGS += -Wl,-subsystem,windows
|
||||
LIBWINSOCK = -lwsock32
|
||||
else ifeq ($(UNAME), darwin)
|
||||
LIBDIVECOMPUTERINCLUDES = $(shell $(PKGCONFIG) --cflags libdivecomputer)
|
||||
LIBDIVECOMPUTERARCHIVE = $(shell $(PKGCONFIG) --libs libdivecomputer)
|
||||
|
@ -141,7 +142,7 @@ ifneq ($(strip $(LIBXSLT)),)
|
|||
endif
|
||||
endif
|
||||
|
||||
LIBS = $(LIBXML2) $(LIBXSLT) $(LIBGTK) $(LIBGCONF2) $(LIBDIVECOMPUTER) $(EXTRALIBS) $(LIBZIP) -lpthread -lm $(LIBOSMGPSMAP) $(LIBSOUP)
|
||||
LIBS = $(LIBXML2) $(LIBXSLT) $(LIBGTK) $(LIBGCONF2) $(LIBDIVECOMPUTER) $(EXTRALIBS) $(LIBZIP) -lpthread -lm $(LIBOSMGPSMAP) $(LIBSOUP) $(LIBWINSOCK)
|
||||
|
||||
MSGLANGS=$(notdir $(wildcard po/*po))
|
||||
MSGOBJS=$(addprefix share/locale/,$(MSGLANGS:.po=.UTF-8/LC_MESSAGES/subsurface.mo))
|
||||
|
|
6
sha1.c
6
sha1.c
|
@ -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__))
|
||||
|
|
Loading…
Reference in a new issue