mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-27 19:23:40 +00:00
Fix #1306
This commit is contained in:
+1
-1
@@ -217,7 +217,7 @@ AC_CHECK_FUNCS([memset select setresuid setreuid strerror get_current_dir_name g
|
||||
AC_CHECK_LIB(socket, connect)
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS([malloc memset socket])
|
||||
AC_CHECK_FUNCS([malloc memset posix_memalign socket])
|
||||
|
||||
dnl Add define for libudns to enable IPv6 support
|
||||
dnl This is an option defined in the origin configure script
|
||||
|
||||
@@ -234,7 +234,11 @@ ss_align(size_t size)
|
||||
{
|
||||
int err;
|
||||
void *tmp;
|
||||
#ifdef HAVE_POSIX_MEMALIGN
|
||||
err = posix_memalign(&tmp, sizeof(void *), size);
|
||||
#else
|
||||
err = -1;
|
||||
#endif
|
||||
if (err) {
|
||||
return ss_malloc(size);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user