1From: Otavio Salvador <otavio@ossystems.com.br> 2Subject: [PATCH] Avoid aligned allocation function name clashes 3 4glibc added new methods for aligned allocation and it clashes with the 5local version used by 'tiobench'. To fix it, we prefix the methods 6with '_'. 7 8Upstream-Status: Pending 9 10Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> 11--- 12 tiotest.c | 8 ++++---- 13 1 files changed, 4 insertions(+), 4 deletions(-) 14 15diff --git a/tiotest.c b/tiotest.c 16index 38f54e7..6b3d0c3 100644 17--- a/tiotest.c 18+++ b/tiotest.c 19@@ -31,7 +31,7 @@ static const char* versionStr = "tiotest v0.3.3 (C) 1999-2000 Mika Kuoppala <mik 20 */ 21 ArgumentOptions args; 22 23-static void * aligned_alloc(ssize_t size) 24+static void * _aligned_alloc(ssize_t size) 25 { 26 caddr_t a; 27 a = mmap((caddr_t )0, size, 28@@ -41,7 +41,7 @@ static void * aligned_alloc(ssize_t size) 29 return a; 30 } 31 32-static int aligned_free(caddr_t a, ssize_t size) 33+static int _aligned_free(caddr_t a, ssize_t size) 34 { 35 return munmap(a, size); 36 } 37@@ -281,7 +281,7 @@ void initialize_test( ThreadTest *d ) 38 pthread_attr_setscope(&(d->threads[i].thread_attr), 39 PTHREAD_SCOPE_SYSTEM); 40 41- d->threads[i].buffer = aligned_alloc( d->threads[i].blockSize ); 42+ d->threads[i].buffer = _aligned_alloc( d->threads[i].blockSize ); 43 if( d->threads[i].buffer == NULL ) 44 { 45 perror("Error allocating memory"); 46@@ -383,7 +383,7 @@ void cleanup_test( ThreadTest *d ) 47 { 48 if (!args.rawDrives) 49 unlink(d->threads[i].fileName); 50- aligned_free( d->threads[i].buffer, d->threads[i].blockSize ); 51+ _aligned_free( d->threads[i].buffer, d->threads[i].blockSize ); 52 d->threads[i].buffer = 0; 53 54 pthread_attr_destroy( &(d->threads[i].thread_attr) ); 55-- 561.7.7 57 58