gentlsrc: fix compiling on Linux

This plugin still needs a major refactor, and currently requires
modifications to support any Linux GenTL producers, at least the CTI
path.
This commit is contained in:
Joshua M. Doe 2021-11-19 12:44:02 -05:00
parent 81d806417d
commit 9e91e8afc9
2 changed files with 21 additions and 3 deletions

View File

@ -3,6 +3,13 @@
#include <gmodule.h>
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif
#ifdef _WIN32
typedef struct _MYFILETIME
{
guint32 dwLowDateTime;
@ -39,5 +46,19 @@ get_unix_ns ()
ltime.QuadPart -= 11644473600000 * 10000;
return ltime.QuadPart * 100;
}
#endif /* _WIN32 */
#ifdef __unix__
static guint64
get_unix_ns ()
{
struct timespec spec;
clock_gettime (CLOCK_REALTIME, &spec);
return (guint64) spec.tv_sec * 1000000000L + (guint64) spec.tv_nsec;
}
#endif /* __unix__ */
#endif /* _GET_UNIX_NS_H_ */

View File

@ -34,9 +34,6 @@
#include "config.h"
#endif
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <gmodule.h>
#include <gio/gio.h>