From 72726b2f32de1148afe56527b9425e60f48d8242 Mon Sep 17 00:00:00 2001 From: harti Date: Tue, 22 May 2012 09:59:49 +0000 Subject: Fix a compilation error with some compilers: __attribute__ requires two parenthesis for its argument, but instead of using __attribute__ directly, use the appropriate __nonnull macro from cdefs.h. --- include/malloc_np.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'include/malloc_np.h') diff --git a/include/malloc_np.h b/include/malloc_np.h index 699077f..e130552 100644 --- a/include/malloc_np.h +++ b/include/malloc_np.h @@ -55,13 +55,11 @@ int mallctlbymib(const size_t *mib, size_t miblen, void *oldp, #define ALLOCM_ERR_OOM 1 #define ALLOCM_ERR_NOT_MOVED 2 -int allocm(void **ptr, size_t *rsize, size_t size, int flags) - __attribute__(nonnull(1)); +int allocm(void **ptr, size_t *rsize, size_t size, int flags) __nonnull(1); int rallocm(void **ptr, size_t *rsize, size_t size, size_t extra, - int flags) __attribute__(nonnull(1)); -int sallocm(const void *ptr, size_t *rsize, int flags) - __attribute__(nonnull(1)); -int dallocm(void *ptr, int flags) __attribute__(nonnull(1)); + int flags) __nonnull(1); +int sallocm(const void *ptr, size_t *rsize, int flags) __nonnull(1); +int dallocm(void *ptr, int flags) __nonnull(1); int nallocm(size_t *rsize, size_t size, int flags); __END_DECLS -- cgit v1.1