]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
include linux/types.h on CentOS 5 in test_sparse_basic.c 46/head
authorTerrell Russell <terrellrussell@gmail.com>
Tue, 30 Jul 2013 18:52:24 +0000 (14:52 -0400)
committerTerrell Russell <terrellrussell@gmail.com>
Tue, 30 Jul 2013 18:52:24 +0000 (14:52 -0400)
Was getting this error:

In file included from ....../libarchive-3.1.2/libarchive/test/test_sparse_basic.c:44:
/usr/include/linux/fiemap.h:15: error: expected specifier-qualifier-list before ‘__u64’
/usr/include/linux/fiemap.h:26: error: expected specifier-qualifier-list before ‘__u64’

From https://groups.google.com/forum/#!msg/libarchive-discuss/691PHz5ENOc/4OzXBevG75AJ I see that the <linux/types.h> file is not included.

This fixed the problem for me on CentOS 5.8.
It was not visible as an issue on CentOS 6.3 or Ubuntu 10 or 12.

This change did not appear to break those already functioning platforms.

libarchive/test/test_sparse_basic.c

index 1963aa4985dc4e70c0f761a56f4474b691529d51..fc3d56c54f663e134cc9bb4ececb0ae4e999ad84 100644 (file)
@@ -40,6 +40,9 @@ __FBSDID("$FreeBSD$");
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#ifdef HAVE_LINUX_TYPES_H
+#include <linux/types.h>
+#endif
 #ifdef HAVE_LINUX_FIEMAP_H
 #include <linux/fiemap.h>
 #endif