Libhugetlbfs could not be compiled in my Fedora-13, the reason is that S_ISDIR was defined in <sys/stat.h> which needs to be included in elflink.c. This patch solves this problem through applying a patch before doing the test.
Signed-off-by: Jason Wang <[email protected]> Cc: Ashwin Ganti <[email protected]> --- client/tests/libhugetlbfs/elflink.patch | 12 ++++++++++++ client/tests/libhugetlbfs/libhugetlbfs.py | 3 ++- 2 files changed, 14 insertions(+), 1 deletions(-) create mode 100644 client/tests/libhugetlbfs/elflink.patch diff --git a/client/tests/libhugetlbfs/elflink.patch b/client/tests/libhugetlbfs/elflink.patch new file mode 100644 index 0000000..5707766 --- /dev/null +++ b/client/tests/libhugetlbfs/elflink.patch @@ -0,0 +1,12 @@ +diff --git a/elflink.c b/elflink.c +index c39c04e..92729cc 100644 +--- a/elflink.c ++++ b/elflink.c +@@ -37,6 +37,7 @@ + #include <limits.h> + #include <elf.h> + #include <dlfcn.h> ++#include <sys/stat.h> + + #include "version.h" + #include "hugetlbfs.h" diff --git a/client/tests/libhugetlbfs/libhugetlbfs.py b/client/tests/libhugetlbfs/libhugetlbfs.py index adad0c4..5ec10c5 100644 --- a/client/tests/libhugetlbfs/libhugetlbfs.py +++ b/client/tests/libhugetlbfs/libhugetlbfs.py @@ -39,7 +39,8 @@ class libhugetlbfs(test.test): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) - + + utils.system('patch -p1 < ../elflink.patch') # make might fail if there are no proper headers for the 32 bit # version, in that case try only for the 64 bit version try: -- 1.5.5.6 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
