#include <string.h>
#include <errno.h>
#include <getopt.h>
+#include <stdlib.h>
char * Progname;
for (j=0; j < nfiles; j += stride) {
if (ret[i].bs_ino == inodelist[j]) {
/* oops ... */
- printf("failed. Unlinked inode %ld returned by bulkstat\n", inodelist[j]);
+ printf("failed. Unlinked inode %llu returned by bulkstat\n", (unsigned long long)inodelist[j]);
exit(1);
}
}
if ((ret[i].bs_ino == inodelist[j]) &&
(ret[i].bs_gen == genlist[j])) {
/* oops, the same inode with old gen number */
- printf("Unlinked inode %ld with generation %d "
+ printf("Unlinked inode %llu with generation %d "
"returned by bulkstat\n",
- inodelist[j], genlist[j]);
+ (unsigned long long)inodelist[j],
+ genlist[j]);
exit(1);
}
if ((ret[i].bs_ino == inodelist[j])) {
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
int
main(argc, argv)
int c;
struct sockaddr_in myAddr;
struct linger noLinger = {1, 0};
- char *host;
+ char *host = NULL;
char *endnum;
int errflag = 0;
char *p;
/* dxm - 28/2/2 */
-#define _GNU_SOURCE
-
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
return 1;
}
if (verbose_opt) {
- printf("truncating back to %lu\n", NUMHOLES_TO_SIZE(num_holes));
+ printf("truncating back to %llu\n",
+ (unsigned long long)
+ NUMHOLES_TO_SIZE(num_holes));
}
return 0;
}
curr_holes = 0;
}
if (curr_holes != 0 && verbose_opt) {
- printf("creating %lu more holes\n", num_holes - curr_holes);
+ printf("creating %llu more holes\n",
+ (unsigned long long)num_holes - curr_holes);
}
/* create holes by seeking and writing */
}
if (verbose_opt && ((i+1) % status_num == 0)) {
- printf("seeked and wrote %lu times\n", i+1);
+ printf("seeked and wrote %llu times\n",
+ (unsigned long long)i + 1);
}
}
#include <errno.h>
#include <time.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#define O_DIRECT 040000
}
}
- err = posix_memalign(&buf, ALIGNMENT, BUFSIZE);
+ err = posix_memalign((void **)&buf, ALIGNMENT, BUFSIZE);
if (err < 0) perror("posix_memalign failed");
- err = posix_memalign(&goodbuf, ALIGNMENT, BUFSIZE);
+ err = posix_memalign((void **)&goodbuf, ALIGNMENT, BUFSIZE);
if (err < 0) perror("posix_memalign failed");
err = unlink(filename);