--- libgd-2.3.0/src/gd_topal.c.orig	2020-03-24 14:30:18.368423900 +0300
+++ libgd-2.3.0/src/gd_topal.c	2020-03-24 14:34:05.629546300 +0300
@@ -1527,8 +1527,12 @@
 /* liq requires 16 byte aligned heap memory */
 static void *malloc16(size_t size)
 {
+#ifdef _WIN32
+	return _aligned_malloc(16, size);
+#else
 	void *p;
 	return posix_memalign(&p, 16, size) == 0 ? p : NULL;
+#endif
 }
 #endif
 
