aboutsummaryrefslogtreecommitdiff
path: root/ports/rtmidi/fix-POSIXname.patch
diff options
context:
space:
mode:
authorThad House <thadhouse1@gmail.com>2019-05-31 13:49:13 -0700
committerThad House <thadhouse1@gmail.com>2019-05-31 13:49:13 -0700
commit788af2a75cfddbb9ef4e4217f4c0b506d25f2f3b (patch)
tree173ade0e6960917458afe9dd9fb0c3c2b7f32051 /ports/rtmidi/fix-POSIXname.patch
parentf483ae4c7fd04eed671a1de595374f84175311e9 (diff)
parent26a9338c5055193915290527eacb37f2ac7fdcb8 (diff)
downloadvcpkg-788af2a75cfddbb9ef4e4217f4c0b506d25f2f3b.tar.gz
vcpkg-788af2a75cfddbb9ef4e4217f4c0b506d25f2f3b.zip
Merge master
Diffstat (limited to 'ports/rtmidi/fix-POSIXname.patch')
-rw-r--r--ports/rtmidi/fix-POSIXname.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/ports/rtmidi/fix-POSIXname.patch b/ports/rtmidi/fix-POSIXname.patch
new file mode 100644
index 000000000..a2a5b0ee1
--- /dev/null
+++ b/ports/rtmidi/fix-POSIXname.patch
@@ -0,0 +1,17 @@
+diff --git a/rtmidi_c.cpp b/rtmidi_c.cpp
+index 248c9e5..ec1dd38 100644
+--- a/rtmidi_c.cpp
++++ b/rtmidi_c.cpp
+@@ -136,7 +136,11 @@ const char* rtmidi_get_port_name (RtMidiPtr device, unsigned int portNumber)
+ {
+ try {
+ std::string name = ((RtMidi*) device->ptr)->getPortName (portNumber);
+- return strdup (name.c_str ());
++#if defined(_WIN) || defined(WINAPI_FAMILY) //Windows platform
++ return _strdup (name.c_str ());
++#else // Unix platform
++ return strdup (name.c_str ());
++#endif
+
+ } catch (const RtMidiError & err) {
+ device->ok = false;