From ae20aad17d58ad704e44f737c20c4b4df1e7550293968cab9960e94946359de5 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Sun, 29 May 2016 21:54:23 +0000 Subject: [PATCH] - u_use-off_t-instead-of-long-to-make-largefile-support-work.patch Make largefile support work (boo#981522). OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/sessreg?expand=0&rev=13 --- sessreg.changes | 6 +++ sessreg.spec | 2 + ...-long-to-make-largefile-support-work.patch | 45 +++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 u_use-off_t-instead-of-long-to-make-largefile-support-work.patch diff --git a/sessreg.changes b/sessreg.changes index e7a518e..11642d2 100644 --- a/sessreg.changes +++ b/sessreg.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun May 29 21:53:51 UTC 2016 - eich@suse.com + +- u_use-off_t-instead-of-long-to-make-largefile-support-work.patch + Make largefile support work (boo#981522). + ------------------------------------------------------------------- Thu Apr 21 14:35:20 UTC 2016 - sndirsch@suse.com diff --git a/sessreg.spec b/sessreg.spec index aff3d29..36c0069 100644 --- a/sessreg.spec +++ b/sessreg.spec @@ -25,6 +25,7 @@ Group: System/X11/Utilities Url: http://xorg.freedesktop.org/ Source0: http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2 Patch0: U_Pass-P-to-the-preprocessor-when-generating-filenames.patch +Patch1: u_use-off_t-instead-of-long-to-make-largefile-support-work.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: pkg-config @@ -42,6 +43,7 @@ other display managers such as gdm or kdm. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build autoreconf -fi diff --git a/u_use-off_t-instead-of-long-to-make-largefile-support-work.patch b/u_use-off_t-instead-of-long-to-make-largefile-support-work.patch new file mode 100644 index 0000000..b411204 --- /dev/null +++ b/u_use-off_t-instead-of-long-to-make-largefile-support-work.patch @@ -0,0 +1,45 @@ +From: Egbert Eich +Date: Sat May 28 11:49:55 2016 +0200 +Subject: [PATCH]use off_t instead of long to make largefile support work +Patch-mainline: to be upstreamed +Git-commit: 3d1a85fdb06e1bf1b6eedaf1dd87466da33844b1 +References: boo#981522 +Signed-off-by: Egbert Eich + +Signed-off-by: Egbert Eich +Investigated-by: Herbert Kütz +--- + sessreg.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sessreg.c b/sessreg.c +index bdfe8f0..3efd8d9 100644 +--- a/sessreg.c ++++ b/sessreg.c +@@ -327,7 +327,7 @@ main (int argc, char **argv) + # else + utmp = open (utmp_file, O_RDWR); + if (utmp != -1) { +- syserr ((int) lseek (utmp, (long) slot_number * sizeof (struct utmp), 0), "lseek"); ++ syserr ((int) lseek (utmp, (off_t) slot_number * sizeof (struct utmp), 0), "lseek"); + sysnerr (write (utmp, (char *) &utmp_entry, sizeof (utmp_entry)) + == sizeof (utmp_entry), "write utmp entry"); + close (utmp); +@@ -362,7 +362,7 @@ main (int argc, char **argv) + if (llog != -1) { + struct lastlog ll; + +- sysnerr (lseek(llog, (long) (pwd->pw_uid*sizeof(ll)), 0) ++ sysnerr (lseek(llog, (off_t) (pwd->pw_uid*sizeof(ll)), 0) + != -1, "seeking lastlog entry"); + memset(&ll, 0, sizeof(ll)); + ll.ll_time = current_time; +@@ -628,7 +628,7 @@ findslot (char *line_name, char *host_name, int addp, int slot) + * first, try to locate a previous entry for this display + * also record location of a free slots in case we need a new one + */ +- syserr ((int) lseek (utmp, (long) slot * sizeof (struct utmp), 0), "lseek"); ++ syserr ((int) lseek (utmp, (off_t) slot * sizeof (struct utmp), 0), "lseek"); + + if (!host_name) + host_name = "";