ref: 7915c0a21037e53b0d65b4a0da200836b6939032
parent: e77b325b91809d079312538afe651bf34c2b036a
author: knik <knik@users.sourceforge.net>
date: Sun Jul 9 13:37:08 EDT 2017
MINGW compile/build fix
--- a/common/mp4v2/mpeg4ip_win32.h
+++ b/common/mp4v2/mpeg4ip_win32.h
@@ -62,6 +62,7 @@
typedef int socklen_t;
typedef int ssize_t;
typedef unsigned int uint;
+#ifndef __MINGW32__
static inline int snprintf(char *buffer, size_t count,
const char *format, ...) {
va_list ap;
@@ -75,6 +76,7 @@
}
return ret;
}
+#endif
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#define localtime_r(a,b) localtime_s(b,a)
@@ -125,7 +127,7 @@
#define X64F "I64x"
#define TO_D64(a) (a##I64)
-#define TO_U64(a) (a##UI64)
+#define TO_U64(a) (a##ULL)
#define LOG_EMERG 0
#define LOG_ALERT 1
--- a/configure.ac
+++ b/configure.ac
@@ -63,6 +63,10 @@
AM_CONDITIONAL(USE_DRM, false)
fi
+if test "$host_os" = "mingw32"; then
+ AM_CONDITIONAL(MINGW, true)
+fi
+
AC_C_BIGENDIAN
dnl Checks for header files required for mp4.h
--- a/frontend/Makefile.am
+++ b/frontend/Makefile.am
@@ -14,3 +14,7 @@
LDADD = $(top_builddir)/libfaac/libfaac.la -lm
endif
endif
+
+if MINGW
+LDADD += -lws2_32
+endif
\ No newline at end of file