mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1083116 - build fails: malloc_decls.h conflicting types for 'malloc_usable_size' r=glandium
This commit is contained in:
parent
60ecf1aa35
commit
79a7544742
13
configure.in
13
configure.in
@ -3385,6 +3385,19 @@ MOZ_CHECK_HEADERS(alloca.h)
|
|||||||
AC_CHECK_FUNCS(strndup posix_memalign memalign)
|
AC_CHECK_FUNCS(strndup posix_memalign memalign)
|
||||||
|
|
||||||
AC_CHECK_FUNCS(malloc_usable_size)
|
AC_CHECK_FUNCS(malloc_usable_size)
|
||||||
|
MALLOC_USABLE_SIZE_CONST_PTR=const
|
||||||
|
MOZ_CHECK_HEADERS([malloc.h], [
|
||||||
|
AC_MSG_CHECKING([whether malloc_usable_size definition can use const argument])
|
||||||
|
AC_TRY_COMPILE([#include <malloc.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
size_t malloc_usable_size(const void *ptr);],
|
||||||
|
[return malloc_usable_size(0);],
|
||||||
|
AC_MSG_RESULT([yes]),
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
MALLOC_USABLE_SIZE_CONST_PTR=)
|
||||||
|
])
|
||||||
|
AC_DEFINE_UNQUOTED([MALLOC_USABLE_SIZE_CONST_PTR],[$MALLOC_USABLE_SIZE_CONST_PTR])
|
||||||
|
|
||||||
|
|
||||||
dnl In newer bionic headers, valloc is built but not defined,
|
dnl In newer bionic headers, valloc is built but not defined,
|
||||||
dnl so we check more carefully here.
|
dnl so we check more carefully here.
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
|
|
||||||
# include "jemalloc_types.h"
|
# include "jemalloc_types.h"
|
||||||
|
|
||||||
# if defined(__linux__) && (!defined(MOZ_MEMORY_ANDROID) || ANDROID_VERSION < 19)
|
#ifndef MALLOC_USABLE_SIZE_CONST_PTR
|
||||||
typedef void * usable_ptr_t;
|
#define MALLOC_USABLE_SIZE_CONST_PTR const
|
||||||
# else
|
#endif
|
||||||
typedef const void * usable_ptr_t;
|
|
||||||
# endif
|
typedef MALLOC_USABLE_SIZE_CONST_PTR void * usable_ptr_t;
|
||||||
|
|
||||||
# define MALLOC_FUNCS_MALLOC 1
|
# define MALLOC_FUNCS_MALLOC 1
|
||||||
# define MALLOC_FUNCS_JEMALLOC 2
|
# define MALLOC_FUNCS_JEMALLOC 2
|
||||||
|
Loading…
Reference in New Issue
Block a user