Use _aligned_* when compiling with MSVC
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 7 Dec 2013 23:10:42 +0000 (00:10 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 7 Dec 2013 23:12:31 +0000 (00:12 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
include/vlc_common.h

index f0df305..62b1260 100644 (file)
@@ -806,6 +806,9 @@ VLC_API bool vlc_ureduce( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t )
 #ifdef __MINGW32__
 # define vlc_memalign(align, size) (__mingw_aligned_malloc(size, align))
 # define vlc_free(base)            (__mingw_aligned_free(base))
+#elif defined(_MSC_VER)
+# define vlc_memalign(align, size) (_aligned_malloc(size, align))
+# define vlc_free(base)            (_aligned_free(base))
 #elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)
 static inline void *vlc_memalign(size_t align, size_t size)
 {