fix builds with prefix

This commit is contained in:
Daniel Micay 2018-08-29 15:06:49 -04:00
parent becadc57a5
commit e85c69a0a4
2 changed files with 4 additions and 1 deletions

View File

@ -897,7 +897,7 @@ EXPORT void h_free(void *p) {
deallocate(p);
}
EXPORT void h_cfree(void *ptr) __attribute__((alias("free")));
EXPORT void h_cfree(void *ptr) ALIAS(h_free);
EXPORT size_t h_malloc_usable_size(void *p) {
if (p == NULL) {

3
util.h
View File

@ -10,6 +10,9 @@
#define UNUSED __attribute__((unused))
#define EXPORT __attribute__((visibility("default")))
#define stringify(s) #s
#define ALIAS(f) __attribute__((alias(stringify(f))))
static inline int ffzl(long x) {
return __builtin_ffsl(~x);
}