mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-28 10:44:43 +08:00
Use _aligned_malloc instead
This commit is contained in:
1 parent
ba930dcca7
commit
4fb34de463
2 files changed
+5
-3
No files matched your search
@@ -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
@@ -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