#include <errno.h>
#include <termios.h>
#include <fnmatch.h>
+#include <fcntl.h>
#include <lock.h>
#include <afs/param.h>
#include <afs/vnode.h>
#include <afs/volume.h>
+#ifdef AFS_LINUX24_ENV
+#define _LARGEFILE64_SOURCE 1
+#endif
#ifdef RESIDENCY
#include <afs/rsdefs.h>
#include <afs/remioint.h>
char *p;
struct winsize win;
FILE *f;
+ int fd;
#ifdef RESIDENCY
for (i = 0; i < RS_MAXRESIDENCIES; i++) {
* Try opening the dump file
*/
- if ((f = fopen(argv[optind], "rb")) == NULL) {
+#ifdef O_LARGEFILE
+ if ((fd = open(argv[optind], O_RDONLY | O_LARGEFILE)) < 0) {
+#else
+ if ((fd = open(argv[optind], O_RDONLY)) < 0) {
+#endif
fprintf(stderr, "open of dumpfile %s failed: %s\n", argv[optind],
strerror(errno));
exit(1);
}
+ if ((f = fdopen(fd, "rb")) == NULL) {
+ fprintf(stderr, "fdopen of dumpfile %s failed: %s\n", argv[optind],
+ strerror(errno));
+ exit(1);
+ }
+
if (ReadDumpHeader(f, &dheader)) {
fprintf(stderr, "Failed to read dump header!\n");
exit(1);