mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests: fix build errors and warnings
After upgrading userspace on test machines to xfsprogs-4.2.0-rc1, lots of build warnings and failures are exposed from implicit includes that no longer exist. Hence these need fixing to allow fstests to build correctly. gcc also seems to have grown new stupidities around uninitialised variables, so fix them while touching the same files. Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <lib/hsm.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <getopt.h>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <lib/hsm.h>
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include <lib/hsm.h>
|
||||
#include <string.h>
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -18,8 +18,11 @@
|
||||
|
||||
#include <lib/hsm.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <sys/uio.h> /* for struct iovec (readv)*/
|
||||
#include <sys/mman.h> /* for mmap(2) */
|
||||
#include <sys/ipc.h> /* for i/o buffer in shared memory */
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
* Test bulkstat doesn't returned unlinked inodes.
|
||||
* Mark Goodwin <markgw@sgi.com> Fri Jul 20 09:13:57 EST 2007
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <xfs/xfs.h>
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
||||
@@ -6,11 +6,13 @@
|
||||
* This is a modified version of bulkstat_unlink_test.c to reproduce a specific
|
||||
* problem see pv 969192
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <xfs/xfs.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <xfs/xfs.h>
|
||||
|
||||
+3
-3
@@ -47,13 +47,13 @@ int argc;
|
||||
char **argv;
|
||||
{
|
||||
int fd, err, elapsed;
|
||||
char *buf, *goodbuf;
|
||||
char *buf = NULL, *goodbuf = NULL;
|
||||
time_t starttime;
|
||||
char *filename="testfile";
|
||||
int c;
|
||||
|
||||
if(argc != 3)
|
||||
{ printf("Usage: trunc -f testfilename\n");
|
||||
if (argc != 3) {
|
||||
printf("Usage: trunc -f testfilename\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -16,7 +16,12 @@
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <xfs/xfs.h>
|
||||
#include <xfs/jdm.h>
|
||||
|
||||
Reference in New Issue
Block a user