Use _aligned_malloc instead

This commit is contained in:
Max Lv committed 2019-01-22 12:39:29 +08:00
1 parent ba930dcca7
commit 4fb34de463
2 files changed
+5 -3

No files matched your search

+2 -2
View File
@@ -51,7 +51,7 @@ build_proj() {
CFLAGS="-DCARES_STATICLIB -DPCRE_STATIC"
make clean
make -j$cpu LDFLAGS="-all-static -L${dep}/lib"
make install-strip
make install
# Reference SIP003 plugin (Experimental)
[[ "${PLUGIN}" != "true" ]] && return 0
@@ -74,7 +74,7 @@ build_proj() {
--with-ev="$dep"
make clean
make -j$cpu LDFLAGS="-all-static -L${dep}/lib"
make install-strip
make install
}
dk_build() {
+3 -1
View File
@@ -32,6 +32,8 @@
#include <errno.h>
#include <pwd.h>
#include <grp.h>
#else
#include <malloc.h>
#endif
#include <sys/types.h>
@@ -249,7 +251,7 @@ ss_align(size_t size)
/* ensure 16 byte alignment */
err = posix_memalign(&tmp, 16, size);
#elif __MINGW32__
tmp = __mingw_aligned_malloc(size, 16);
tmp = _aligned_malloc(size, 16);
err = tmp == NULL;
#else
err = -1;