xfs
[Top] [All Lists]

[PATCH] xfstests: fix fsx build with the new xfs headers

To: xfs@xxxxxxxxxxx
Subject: [PATCH] xfstests: fix fsx build with the new xfs headers
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sun, 24 Jul 2011 07:20:23 -0400
User-agent: Mutt/1.5.21 (2010-09-15)
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 <hch@xxxxxx>

Index: xfstests-dev/ltp/fsx.c
===================================================================
--- xfstests-dev.orig/ltp/fsx.c 2011-07-23 14:27:27.000000000 +0000
+++ xfstests-dev/ltp/fsx.c      2011-07-23 14:28:10.000000000 +0000
@@ -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;

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] xfstests: fix fsx build with the new xfs headers, Christoph Hellwig <=