From: Christoph Hellwig Date: Tue, 26 Jul 2011 10:12:47 +0000 (+0200) Subject: fix fsx build with newer xfs headers X-Git-Tag: v1.1.0~28 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=81ee4b6dc94405faf391d039f0723d2a50a3b842;p=xfstests-dev.git fix fsx build with newer xfs headers The libxfs resync brought in a new round_up macro that conflicts with the round_up function in fsx. Rename the latter to allow building against the new headers. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner --- diff --git a/ltp/fsx.c b/ltp/fsx.c index d53c4980..36b38f7e 100644 --- a/ltp/fsx.c +++ b/ltp/fsx.c @@ -165,7 +165,7 @@ FILE * fsxlogf = NULL; int badoff = -1; int closeopen = 0; -static void *round_up(void *ptr, unsigned long align, unsigned long offset) +static void *round_ptr_up(void *ptr, unsigned long align, unsigned long offset) { unsigned long ret = (unsigned long)ptr; @@ -1570,10 +1570,10 @@ main(int argc, char **argv) for (i = 0; i < maxfilelen; i++) original_buf[i] = random() % 256; good_buf = (char *) malloc(maxfilelen + writebdy); - good_buf = round_up(good_buf, writebdy, 0); + good_buf = round_ptr_up(good_buf, writebdy, 0); memset(good_buf, '\0', maxfilelen); temp_buf = (char *) malloc(maxoplen + readbdy); - temp_buf = round_up(temp_buf, readbdy, 0); + temp_buf = round_ptr_up(temp_buf, readbdy, 0); memset(temp_buf, '\0', maxoplen); if (lite) { /* zero entire existing file */ ssize_t written;