diff options
author | Robin Gareus <robin@gareus.org> | 2018-11-19 12:50:38 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-11-19 12:54:07 +0100 |
commit | d18b247a05906aec00d684996c493b5444a46e77 (patch) | |
tree | 612e27357d6adf27f03cf9df3460b20a640ab229 /libs/pbd/system_exec.cc | |
parent | df72e1ba4f7e7dc0d67ea6c0fbdf157ee3777275 (diff) |
Fix Windows and Mac Builds
* missing include for locale_to_utf8 (amend 4c6ff5f7e7)
* avoid void* arithemtic (amend 103ef2ba)
Diffstat (limited to 'libs/pbd/system_exec.cc')
-rw-r--r-- | libs/pbd/system_exec.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/pbd/system_exec.cc b/libs/pbd/system_exec.cc index ed36c507ff..cc5d8d99fe 100644 --- a/libs/pbd/system_exec.cc +++ b/libs/pbd/system_exec.cc @@ -601,7 +601,7 @@ SystemExec::write_to_stdin(const void* data, size_t bytes) c=0; while (c < bytes) { - if (!WriteFile(stdinP[1], data+c, bytes-c, &r, NULL)) { + if (!WriteFile(stdinP[1], &((const char*)data)[c], bytes - c, &r, NULL)) { if (GetLastError() == 0xE8 /*NT_STATUS_INVALID_USER_BUFFER*/) { Sleep(100); continue; @@ -965,7 +965,7 @@ SystemExec::write_to_stdin(const void* data, size_t bytes) c=0; while (c < bytes) { for (;;) { - r=::write(pin[1], data+c, bytes-c); + r = ::write(pin[1], &((const char*)data)[c], bytes - c); if (r < 0 && (errno == EINTR || errno == EAGAIN)) { sleep(1); continue; |