From d1c0ba0dc7ad698fc1d5c50e472d2410d25c1718 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Mon, 29 Jun 2015 08:07:09 +0200 Subject: [PATCH] - fix incorrect timespec usage --- igb.spec | 2 ++ timespec64.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 timespec64.patch diff --git a/igb.spec b/igb.spec index 45bd1df..7c3a463 100644 --- a/igb.spec +++ b/igb.spec @@ -17,6 +17,7 @@ License: GPL v2 Group: Base/Kernel Source0: http://downloads.sourceforge.net/e1000/%{pname}-%{version}.tar.gz # Source0-md5: dbedbb2cefaf3fa09eb5a4912914cdac +Patch0: timespec64.patch URL: http://sourceforge.net/projects/e1000/ %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2} BuildRequires: rpm-build-macros >= 1.701 @@ -80,6 +81,7 @@ EOF\ %prep %setup -q -n %{pname}-%{version} +%patch0 -p1 cat > src/Makefile <<'EOF' obj-m := igb.o diff --git a/timespec64.patch b/timespec64.patch new file mode 100644 index 0000000..edc14cb --- /dev/null +++ b/timespec64.patch @@ -0,0 +1,56 @@ +--- igb-5.3.2/src/igb_ptp.c~ 2015-05-26 23:59:51.000000000 +0200 ++++ igb-5.3.2/src/igb_ptp.c 2015-06-29 08:05:18.930401431 +0200 +@@ -327,7 +327,7 @@ + } + + static int igb_ptp_gettime64_82576(struct ptp_clock_info *ptp, +- struct timespec *ts64) ++ struct timespec64 *ts64) + { + struct igb_adapter *igb = container_of(ptp, struct igb_adapter, + ptp_caps); +@@ -350,7 +350,7 @@ + } + + static int igb_ptp_gettime64_i210(struct ptp_clock_info *ptp, +- struct timespec *ts64) ++ struct timespec64 *ts64) + { + struct igb_adapter *igb = container_of(ptp, struct igb_adapter, + ptp_caps); +@@ -369,7 +369,7 @@ + + #ifdef HAVE_PTP_CLOCK_INFO_GETTIME64 + static int igb_ptp_settime64_82576(struct ptp_clock_info *ptp, +- const struct timespec *ts64) ++ const struct timespec64 *ts64) + { + struct igb_adapter *igb = container_of(ptp, struct igb_adapter, + ptp_caps); +@@ -392,7 +392,7 @@ + + #endif + static int igb_ptp_settime64_i210(struct ptp_clock_info *ptp, +- const struct timespec *ts64) ++ const struct timespec64 *ts64) + { + struct igb_adapter *igb = container_of(ptp, struct igb_adapter, + ptp_caps); +@@ -411,7 +411,7 @@ + + #ifndef HAVE_PTP_CLOCK_INFO_GETTIME64 + static int igb_ptp_gettime_82576(struct ptp_clock_info *ptp, +- struct timespec *ts) ++ struct timespec64 *ts) + { + struct timespec64 ts64; + int err; +@@ -426,7 +426,7 @@ + } + + static int igb_ptp_gettime_i210(struct ptp_clock_info *ptp, +- struct timespec *ts) ++ struct timespec64 *ts) + { + struct timespec64 ts64; + int err; -- 2.44.0