[PATCH] Add a SYS_write definition on systems where it is not defined in headers
Jason Evans
jasone at canonware.com
Fri Mar 30 10:24:08 PDT 2012
On Mar 27, 2012, at 5:48 AM, Mike Hommey wrote:
> From: Mike Hommey <mh at glandium.org>
>
> Namely, in the Android NDK headers, SYS_write is not defined ; but __NR_write is.
> ---
> include/jemalloc/internal/jemalloc_internal.h.in | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in
> index 4f55779..13a9b84 100644
> --- a/include/jemalloc/internal/jemalloc_internal.h.in
> +++ b/include/jemalloc/internal/jemalloc_internal.h.in
> @@ -1,6 +1,9 @@
> #include <sys/mman.h>
> #include <sys/param.h>
> #include <sys/syscall.h>
> +#if !defined(SYS_write) && defined(__NR_write)
> +#define SYS_write __NR_write
> +#endif
> #include <sys/time.h>
> #include <sys/types.h>
> #include <sys/uio.h>
> --
> 1.7.9.1
Applied, with additional paranoia in wrtmessage().
Thanks,
Jason
More information about the jemalloc-discuss
mailing list