Fixes to allow for MINGW32 compilation

This commit is contained in:
Jonathan Bennett 2016-01-15 01:14:50 -06:00
parent 8bb46f9664
commit c0ad75704e
3 changed files with 12 additions and 1 deletions

View File

@ -409,6 +409,10 @@ case "$host" in
*-*-openbsd*)
AC_DEFINE_UNQUOTED([PLATFORM_OPENBSD], [1], [Define if you are running on OpenBSD])
;;
*-mingw32*)
AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
AM_CONDITIONAL(MINGW, true)
;;
esac
dnl Decide whether or not to build the client

View File

@ -10,6 +10,11 @@ libfko_source_files = \
sha1.h sha2.c sha2.h sha3.c sha3.h fko_context.h fko_state.h \
gpgme_funcs.c gpgme_funcs.h
if MINGW
libfko_source_files += ./common/common.h ../common/fko_util.c ../common/fko_util.h \
../common/strlcat.c ../common/strlcpy.c ../win32/getlogin.c ../common/netinet_common.h \
../win32/getlogin.h
endif
if WANT_C_UNIT_TESTS
libfko_la_LIBADD = $(top_builddir)/common/cunit_common.o

View File

@ -30,7 +30,9 @@
#include "fko_common.h"
#include "fko.h"
#ifdef WIN32
#ifdef __MINGW32__
#include "../win32/getlogin.h"
#elif WIN32
#include <getlogin.h>
#endif