Skip to content

Commit 8366558

Browse files
authored
Merge pull request InsightSoftwareConsortium#5777 from blowekamp/gdcm_mingw_aligned
BUG: Fix GDCM posix_memalign undefined with mingw
2 parents a80ec4e + 17e172d commit 8366558

File tree

1 file changed

+2
-2
lines changed
  • Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext

1 file changed

+2
-2
lines changed

Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext/mec_mr3_io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ static bool read_info(struct app *self, const uint8_t group,
312312
}
313313

314314
static void *aligned_alloc_impl(size_t alignment, size_t size) {
315-
#ifdef _MSC_VER
315+
#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
316316
return _aligned_malloc(size, alignment);
317317
#else
318318
// return aligned_alloc(alignment, size);
@@ -957,7 +957,7 @@ bool mec_mr3_print(const void *input, const size_t len) {
957957
good = good && read_group(self, group, nitems, &info, &data);
958958
}
959959
// release memory:
960-
#ifdef _MSC_VER
960+
#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
961961
_aligned_free(data.buffer);
962962
#else
963963
free(data.buffer);

0 commit comments

Comments
 (0)