View | Details | Raw Unified | Return to bug 12117
Collapse All | Expand All

(-)gpart-0.1h/make.defs (-1 / +1 lines)
Lines 2-8 Link Here
2
#
2
#
3
#
3
#
4
CC      = gcc
4
CC      = gcc
5
CFLAGS  = $(RPM_OPT_FLAGS) -std=gnu99 -pedantic
5
CFLAGS  = $(RPM_OPT_FLAGS) -std=gnu99 -pedantic -D_LARGEFILE64_SOURCE
6
LDFLAGS =
6
LDFLAGS =
7
MAKEDEP = gcc -M
7
MAKEDEP = gcc -M
8
INSTALL = install
8
INSTALL = install
(-)gpart-0.1h/src/gpart.c (-2 / +10 lines)
Lines 49-61 Link Here
49
#include <stdio.h>
49
#include <stdio.h>
50
#include <stdlib.h>
50
#include <stdlib.h>
51
#include <stdarg.h>
51
#include <stdarg.h>
52
52
#include <fcntl.h>
53
#include <fcntl.h>
54
#ifndef O_LARGEFILE
55
#warning no large file support, but OK for devices
56
#define O_LARGEFILE 0
57
/*so now x|O_LARGEFILE == x*/
58
#endif
59
53
#include <unistd.h>
60
#include <unistd.h>
54
#include <string.h>
61
#include <string.h>
55
#include <ctype.h>
62
#include <ctype.h>
56
#include <errno.h>
63
#include <errno.h>
57
#include <sys/stat.h>
64
#include <sys/stat.h>
58
#include <sys/types.h>
65
#include <sys/types.h>
66
59
#include "gpart.h"
67
#include "gpart.h"
60
68
61
69
Lines 794-800 Link Here
794
	 * special file or just a regular file.
802
	 * special file or just a regular file.
795
	 */
803
	 */
796
804
797
	if ((d->d_fd = open(dev,O_RDONLY)) == -1)
805
	if ((d->d_fd = open(dev,O_RDONLY|O_LARGEFILE)) == -1)
798
		pr(FATAL,EM_OPENFAIL,dev,strerror(errno));
806
		pr(FATAL,EM_OPENFAIL,dev,strerror(errno));
799
807
800
	/*
808
	/*
Lines 943-949 Link Here
943
	s64_t		bincr, noffset, start;
953
	s64_t		bincr, noffset, start;
944
	byte_t		*ubuf;
954
	byte_t		*ubuf;
945
955
946
	if ((d->d_fd = open(d->d_dev,O_RDONLY)) == -1)
956
	if ((d->d_fd = open(d->d_dev,O_RDONLY|O_LARGEFILE)) == -1)
947
		pr(FATAL,EM_OPENFAIL,d->d_dev,strerror(errno));
957
		pr(FATAL,EM_OPENFAIL,d->d_dev,strerror(errno));
948
958
949
	/*
959
	/*

Return to bug 12117