Репозитории ALT
Группа :: Система/Настройка/Оборудование
Пакет: gpart
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: gpart-0.1h-lodin-largefile.patch
Скачать
Скачать
diff -ur gpart-0.1h/make.defs gpart-0.1h-lodin/make.defs
--- gpart-0.1h/make.defs 2007-06-23 16:36:26 +0400
+++ gpart-0.1h-lodin/make.defs 2007-06-23 16:33:23 +0400
@@ -2,7 +2,7 @@
#
#
CC = gcc
-CFLAGS = $(RPM_OPT_FLAGS) -std=gnu99 -pedantic
+CFLAGS = $(RPM_OPT_FLAGS) -std=gnu99 -pedantic -D_LARGEFILE64_SOURCE
LDFLAGS =
MAKEDEP = gcc -M
INSTALL = install
diff -ur gpart-0.1h/src/gpart.c gpart-0.1h-lodin/src/gpart.c
--- gpart-0.1h/src/gpart.c 2001-02-07 21:08:08 +0300
+++ gpart-0.1h-lodin/src/gpart.c 2007-06-23 16:35:27 +0400
@@ -49,13 +49,21 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
+
#include <fcntl.h>
+#ifndef O_LARGEFILE
+#warning no large file support, but OK for devices
+#define O_LARGEFILE 0
+/*so now x|O_LARGEFILE == x*/
+#endif
+
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
+
#include "gpart.h"
@@ -794,7 +802,7 @@
* special file or just a regular file.
*/
- if ((d->d_fd = open(dev,O_RDONLY)) == -1)
+ if ((d->d_fd = open(dev,O_RDONLY|O_LARGEFILE)) == -1)
pr(FATAL,EM_OPENFAIL,dev,strerror(errno));
/*
@@ -943,7 +953,7 @@
s64_t bincr, noffset, start;
byte_t *ubuf;
- if ((d->d_fd = open(d->d_dev,O_RDONLY)) == -1)
+ if ((d->d_fd = open(d->d_dev,O_RDONLY|O_LARGEFILE)) == -1)
pr(FATAL,EM_OPENFAIL,d->d_dev,strerror(errno));
/*