From 9ddb6b370aea517e25ccc7875fa1578d14ea2a4f Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Tue, 14 Jun 2022 16:47:06 +0100 Subject: [PATCH] Windows build fix --- main/main.cpp | 5 ++++- meson.build | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/main/main.cpp b/main/main.cpp index 265a52d..16e559d 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -49,7 +49,10 @@ using RubberBand::gettimeofday; #endif #ifdef _MSC_VER -using RubberBand::usleep; +#include +static void usleep(unsigned long usec) { + ::Sleep(usec == 0 ? 0 : usec < 1000 ? 1 : usec / 1000); +} #define strdup _strdup #endif diff --git a/meson.build b/meson.build index 8a5a0f1..5dd0492 100644 --- a/meson.build +++ b/meson.build @@ -66,8 +66,8 @@ program_sources = [ if system == 'windows' program_sources += [ - 'src/getopt/getopt.c', - 'src/getopt/getopt_long.c' + 'src/ext/getopt/getopt.c', + 'src/ext/getopt/getopt_long.c' ] endif