mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 23:39:10 +08:00
21445878eb
* [rtmidi] Update to version 4.0.0 * Fix UNIX install failed.
18 lines
601 B
Diff
18 lines
601 B
Diff
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;
|