forked from pool/pcfclock
Accepting request 293070 from network:time
1 OBS-URL: https://build.opensuse.org/request/show/293070 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pcfclock?expand=0&rev=21
This commit is contained in:
commit
e567f06666
14
pcfclock-linux-3.19.patch
Normal file
14
pcfclock-linux-3.19.patch
Normal file
@ -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;
|
||||
|
@ -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
|
||||
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user