cemu-vcpkg/ports/libsoundio/fix_test.patch
Tsukasa Sugiura 889fa61c29 [libsoundio] Add libsoundio port (#8273)
* [libsoundio] Add libsoundio port

* [libsoundio] Add description and homepage

* [libsoundio] WindowsStore not supported

* [libsoundio] Fix libsoundio-config.cmake

* [libsoundio] Fix CMakeLists for Linux
2019-09-23 12:27:07 -07:00

83 lines
1.8 KiB
Diff

diff --git a/backend_disconnect_recover.c b/backend_disconnect_recover.c
index 046a150..7c89df7 100644
--- a/backend_disconnect_recover.c
+++ b/backend_disconnect_recover.c
@@ -12,11 +12,20 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#ifdef _WIN32
+#include <windows.h>
+#define sleep(n) Sleep(n * 1000)
+#else
#include <unistd.h>
+#endif
+#ifdef _MSC_VER
+__declspec (noreturn)
+#else
__attribute__ ((cold))
__attribute__ ((noreturn))
__attribute__ ((format (printf, 1, 2)))
+#endif
static void panic(const char *format, ...) {
va_list ap;
va_start(ap, format);
diff --git a/overflow.c b/overflow.c
index 43b6d22..67947fe 100644
--- a/overflow.c
+++ b/overflow.c
@@ -12,7 +12,12 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#ifdef _WIN32
+#include <windows.h>
+#define sleep(n) Sleep(n * 1000)
+#else
#include <unistd.h>
+#endif
static enum SoundIoFormat prioritized_formats[] = {
SoundIoFormatFloat32NE,
@@ -36,9 +41,13 @@ static enum SoundIoFormat prioritized_formats[] = {
SoundIoFormatInvalid,
};
+#ifdef _MSC_VER
+__declspec (noreturn)
+#else
__attribute__ ((cold))
__attribute__ ((noreturn))
__attribute__ ((format (printf, 1, 2)))
+#endif
static void panic(const char *format, ...) {
va_list ap;
va_start(ap, format);
diff --git a/underflow.c b/underflow.c
index 083e92d..32907de 100644
--- a/underflow.c
+++ b/underflow.c
@@ -12,12 +12,21 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#ifdef _WIN32
+#include <windows.h>
+#define sleep(n) Sleep(n * 1000)
+#else
#include <unistd.h>
+#endif
#include <stdint.h>
+#ifdef _MSC_VER
+__declspec (noreturn)
+#else
__attribute__ ((cold))
__attribute__ ((noreturn))
__attribute__ ((format (printf, 1, 2)))
+#endif
static void panic(const char *format, ...) {
va_list ap;
va_start(ap, format);