aboutsummaryrefslogtreecommitdiff
path: root/ports/libsoundio/fix_example.patch
diff options
context:
space:
mode:
authorTsukasa Sugiura <t.sugiura0204@gmail.com>2019-09-24 04:27:07 +0900
committerVictor Romero <romerosanchezv@gmail.com>2019-09-23 12:27:07 -0700
commit889fa61c29a0ed8566074d6462a825f1263a60b3 (patch)
tree133e77a5222b6b9931488de6b5d2371768ce3006 /ports/libsoundio/fix_example.patch
parent804d8ea43ca8df96dbf976aa0c953d4458fdd03f (diff)
downloadvcpkg-889fa61c29a0ed8566074d6462a825f1263a60b3.tar.gz
vcpkg-889fa61c29a0ed8566074d6462a825f1263a60b3.zip
[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
Diffstat (limited to 'ports/libsoundio/fix_example.patch')
-rw-r--r--ports/libsoundio/fix_example.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/ports/libsoundio/fix_example.patch b/ports/libsoundio/fix_example.patch
new file mode 100644
index 000000000..39bbb9b02
--- /dev/null
+++ b/ports/libsoundio/fix_example.patch
@@ -0,0 +1,36 @@
+diff --git a/sio_microphone.c b/sio_microphone.c
+index 0fa8cca..5c89656 100644
+--- a/sio_microphone.c
++++ b/sio_microphone.c
+@@ -45,10 +45,13 @@ static int prioritized_sample_rates[] = {
+ 0,
+ };
+
+-
++#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/sio_record.c b/sio_record.c
+index 61d584d..c33b05e 100644
+--- a/sio_record.c
++++ b/sio_record.c
+@@ -12,7 +12,12 @@
+ #include <string.h>
+ #include <math.h>
+ #include <errno.h>
++#ifdef _WIN32
++#include <windows.h>
++#define sleep(n) Sleep(n * 1000)
++#else
+ #include <unistd.h>
++#endif
+
+ struct RecordContext {
+ struct SoundIoRingBuffer *ring_buffer;