Browse Source

Fixup carla_shm_create_temp for windows

tags/1.9.7
falkTX 8 years ago
parent
commit
f697dca90e
1 changed files with 4 additions and 6 deletions
  1. +4
    -6
      source/utils/CarlaShmUtils.hpp

+ 4
- 6
source/utils/CarlaShmUtils.hpp View File

@@ -278,14 +278,12 @@ carla_shm_t carla_shm_create_temp(char* const fileBase) noexcept
if (carla_is_shm_valid(shm)) if (carla_is_shm_valid(shm))
return shm; return shm;


// file already exists, keep trying
#ifdef CARLA_OS_WIN
if (::GetLastError() == ERROR_ALREADY_EXISTS)
continue;
#else
#ifndef CARLA_OS_WIN
// if file already exists, keep trying
if (errno == EEXIST) if (errno == EEXIST)
continue; continue;
carla_stderr("carla_shm_create_temp(%s) - failed, error code %i", fileBase, errno);
const int localerrno = errno;
carla_stderr("carla_shm_create_temp(%s) - failed, error code %i", fileBase, localerrno);
#endif #endif


// some unknown error occurred, return null // some unknown error occurred, return null


Loading…
Cancel
Save