mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-11-01 23:43:41 +00:00
Use _aligned_malloc instead
This commit is contained in:
+3
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user