diff --git a/srcpkgs/gperftools/patches/musl-__off64_t.patch b/srcpkgs/gperftools/patches/musl-__off64_t.patch new file mode 100644 index 0000000000..bfaba5f632 --- /dev/null +++ b/srcpkgs/gperftools/patches/musl-__off64_t.patch @@ -0,0 +1,61 @@ +--- src/malloc_hook_mmap_linux.h 2014-12-06 23:51:40.000000000 +0100 ++++ src/malloc_hook_mmap_linux.h 2015-08-26 17:19:59.295705896 +0200 +@@ -56,7 +56,7 @@ + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + return sys_mmap(start, length, prot, flags, fd, offset); + } + +@@ -67,7 +67,7 @@ + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + void *result; + + // Try mmap2() unless it's not supported +@@ -138,7 +138,7 @@ + + extern "C" { + void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset ) __THROW ++ int fd, off64_t offset ) __THROW + ATTRIBUTE_SECTION(malloc_hook); + void* mmap(void *start, size_t length,int prot, int flags, + int fd, off_t offset) __THROW +@@ -153,7 +153,7 @@ + } + + extern "C" void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); + void *result; + if (!MallocHook::InvokeMmapReplacement( +--- src/base/linux_syscall_support.h 2014-12-06 23:51:40.000000000 +0100 ++++ src/base/linux_syscall_support.h 2015-08-26 17:24:29.981711588 +0200 +@@ -2165,9 +2165,9 @@ + int, t, int, p) + #endif + #if defined(__x86_64__) +- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ ++ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ + LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, +- __off64_t o) { ++ off64_t o) { + LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), + LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), + LSS_SYSCALL_ARG(d), (uint64_t)(o)); +@@ -2204,7 +2204,7 @@ + LSS_INLINE _syscall6(void*, mmap, void*, s, + size_t, l, int, p, + int, f, int, d, +- __off64_t, o) ++ off64_t, o) + LSS_INLINE int LSS_NAME(sigaction)(int signum, + const struct kernel_sigaction *act, + struct kernel_sigaction *oldact) { diff --git a/srcpkgs/gperftools/patches/musl-loff_t.patch b/srcpkgs/gperftools/patches/musl-loff_t.patch new file mode 100644 index 0000000000..d96c06111c --- /dev/null +++ b/srcpkgs/gperftools/patches/musl-loff_t.patch @@ -0,0 +1,10 @@ +--- src/base/linux_syscall_support.h 2015-08-26 17:57:39.688753425 +0200 ++++ src/base/linux_syscall_support.h 2015-08-26 17:59:25.779755656 +0200 +@@ -157,6 +157,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/srcpkgs/gperftools/patches/musl-malloc_hook.patch b/srcpkgs/gperftools/patches/musl-malloc_hook.patch new file mode 100644 index 0000000000..eac6dddb57 --- /dev/null +++ b/srcpkgs/gperftools/patches/musl-malloc_hook.patch @@ -0,0 +1,27 @@ +--- src/malloc_hook_mmap_linux.h 2015-08-26 17:40:38.296731949 +0200 ++++ src/malloc_hook_mmap_linux.h 2015-08-26 17:40:10.768731370 +0200 +@@ -40,6 +40,7 @@ + # error Should only be including malloc_hook_mmap_linux.h on linux systems. + #endif + ++#include + #include + #include + #include +@@ -135,6 +135,7 @@ + + // Make sure mmap doesn't get #define'd away by + # undef mmap ++# undef mmap64 + + extern "C" { + void* mmap64(void *start, size_t length, int prot, int flags, +@@ -202,7 +203,7 @@ + return result; + } + +-#ifndef __UCLIBC__ ++#if defined(__GLIBC__) + // libc's version: + extern "C" void* __sbrk(ptrdiff_t increment); + diff --git a/srcpkgs/gperftools/template b/srcpkgs/gperftools/template index 6bacc44c53..6f793d0c42 100644 --- a/srcpkgs/gperftools/template +++ b/srcpkgs/gperftools/template @@ -1,9 +1,9 @@ # Template build file for 'gperftools' pkgname=gperftools version=2.4 -revision=1 +revision=2 build_style=gnu-configure -short_desc="multi-threaded malloc() and performance analysis tools" +short_desc="Multi-threaded malloc() and performance analysis tools" maintainer="Enno Boland " license="BSD-3-Clause" homepage="http://gperftools.googlecode.com"