diff --git a/pcfclock-linux-3.19.patch b/pcfclock-linux-3.19.patch new file mode 100644 index 0000000..9d9dd13 --- /dev/null +++ b/pcfclock-linux-3.19.patch @@ -0,0 +1,14 @@ +--- linux/pcfclock.c ++++ linux/pcfclock.c +@@ -269,7 +269,11 @@ + int rc; + int try; + char buf1[18], buf2[18]; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) + unsigned int minor = iminor(filp->f_dentry->d_inode); ++#else ++ unsigned int minor = iminor(file_inode(filp)); ++#endif + struct pcfclock_struct *pcfclock = &pcfclock_table[minor]; + struct pcfclock_status *status = (struct pcfclock_status *) &filp->private_data; + diff --git a/pcfclock.changes b/pcfclock.changes index 205c8be..2367d8e 100644 --- a/pcfclock.changes +++ b/pcfclock.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Feb 27 01:18:00 CET 2015 - ro@suse.de + +- added patch pcfclock-linux-3.19.patch + fix build with kernel 3.19 + use file_inode to get inode from file pointer +- fix build on 11.4 (skip installing tmpfile config) + ------------------------------------------------------------------- Mon Oct 8 13:15:53 UTC 2012 - aj@suse.de diff --git a/pcfclock.spec b/pcfclock.spec index dff7690..6764a10 100644 --- a/pcfclock.spec +++ b/pcfclock.spec @@ -1,7 +1,7 @@ # # spec file for package pcfclock # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,7 @@ Patch0: pcfclock-nomodule.patch Patch1: pcfclock-module_param.patch Patch2: pcfclock-no_devfs.patch Patch3: pcfclock-include.patch +Patch4: pcfclock-linux-3.19.patch BuildRequires: kernel-source BuildRequires: kernel-syms BuildRequires: module-init-tools @@ -69,6 +70,7 @@ more than 1500 kilometers. %patch1 %patch2 %patch3 +%patch4 mkdir source mkdir obj cp -a linux/pcfclock.c %{SOURCE1} \ @@ -98,8 +100,10 @@ for flavor in %flavors_to_build; do done mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d echo "alias char-major-181 pcfclock" > %{buildroot}%{_sysconfdir}/modprobe.d/50-pcfclock.conf +%if 0%{?suse_version} > 1140 mkdir -p %{buildroot}/usr/lib/tmpfiles.d/ install -m 0644 %{SOURCE3} %{buildroot}/usr/lib/tmpfiles.d/ +%endif %post # Create devices nodes at installation time @@ -112,7 +116,9 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/pcfclock.conf %{_mandir}/man8/pcfdate.8.gz %{_sbindir}/pcfdate %{_sysconfdir}/modprobe.d/50-pcfclock.conf +%if 0%{?suse_version} > 1140 /usr/lib/tmpfiles.d/pcfclock.conf +%endif %clean rm -rf %{buildroot}