From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from lvps176-28-13-145.dedicated.hosteurope.de ([176.28.13.145]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1XEvbV-00019Z-Iz for ptxdist@pengutronix.de; Wed, 06 Aug 2014 09:25:49 +0200 Received: from dabox.localnet (unknown [62.159.134.147]) by lvps176-28-13-145.dedicated.hosteurope.de (Postfix) with ESMTPSA id 85F16A8A409E for ; Wed, 6 Aug 2014 09:25:44 +0200 (CEST) From: Tim Sander Date: Wed, 06 Aug 2014 09:25:43 +0200 Message-ID: <1560862.Hm7u1ZRiUj@dabox> MIME-Version: 1.0 Subject: [ptxdist] [PATCH] systemd: support for older kernel headers taken from upstream Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de These patches help in using systemd with older kernel versions/headers. They are taken from the systemd bugtracker and repository. --- patches/systemd-215/0004-IFLA_compile_fix.patch | 20 +++++++++ patches/systemd-215/0005-IFLA_MACVLAN_FLAGS.patch | 46 +++++++++++++++++++++ patches/systemd-215/series | 5 +-- 3 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 patches/systemd-215/0004-IFLA_compile_fix.patch create mode 100644 patches/systemd-215/0005-IFLA_MACVLAN_FLAGS.patch diff --git a/patches/systemd-215/0004-IFLA_compile_fix.patch b/patches/systemd-215/0004-IFLA_compile_fix.patch new file mode 100644 index 0000000..b0a360c --- /dev/null +++ b/patches/systemd-215/0004-IFLA_compile_fix.patch @@ -0,0 +1,20 @@ +diff -Naur systemd-215/src/shared/missing.h systemd-215.patch/src/shared/missing.h +--- systemd-215/src/shared/missing.h 2014-07-21 14:28:37.277575885 +0200 ++++ systemd-215.patch/src/shared/missing.h 2014-07-21 14:27:39.940232879 +0200 +@@ -381,6 +381,16 @@ + #define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1) + #endif + ++#define IFLA_VTI_UNSPEC 0 ++#define IFLA_VTI_LINK 1 ++#define IFLA_VTI_IKEY 2 ++#define IFLA_VTI_OKEY 3 ++#define IFLA_VTI_LOCAL 4 ++#define IFLA_VTI_REMOTE 5 ++#define __IFLA_VTI_MAX 6 ++ ++#define IFLA_VTI_MAX (__IFLA_VTI_MAX - 1) ++ + #if !HAVE_DECL_IFLA_PHYS_PORT_ID + #undef IFLA_PROMISCUITY + #define IFLA_PROMISCUITY 30 \ No newline at end of file diff --git a/patches/systemd-215/0005-IFLA_MACVLAN_FLAGS.patch b/patches/systemd-215/0005-IFLA_MACVLAN_FLAGS.patch new file mode 100644 index 0000000..4f70f47 --- /dev/null +++ b/patches/systemd-215/0005-IFLA_MACVLAN_FLAGS.patch @@ -0,0 +1,46 @@ +From 75616a1332aff00d27db713cda3bd93c508a5b59 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Wed, 16 Jul 2014 16:44:45 -0400 +Subject: missing.h: add IFLA_MACVLAN_FLAGS + +Now we are getting into kernel < 3.4 territory... + +https://bugs.freedesktop.org/show_bug.cgi?id=80095 + +diff --git a/configure.ac b/configure.ac +index 94aacc9..be05211 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -310,7 +310,8 @@ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN] + #include + ]]) + +-AC_CHECK_DECLS([IFLA_PHYS_PORT_ID, ++AC_CHECK_DECLS([IFLA_MACVLAN_FLAGS, ++ IFLA_PHYS_PORT_ID, + IFLA_BOND_AD_INFO, + IFLA_VLAN_PROTOCOL, + IFLA_VXLAN_LOCAL6, +diff --git a/src/shared/missing.h b/src/shared/missing.h +index f129f0b..818d704 100644 +--- a/src/shared/missing.h ++++ b/src/shared/missing.h +@@ -371,6 +371,15 @@ static inline int setns(int fd, int nstype) { + #define LOOP_CTL_GET_FREE 0x4C82 + #endif + ++#if !HAVE_DECL_IFLA_MACVLAN_FLAGS ++#define IFLA_MACVLAN_UNSPEC 0 ++#define IFLA_MACVLAN_MODE 1 ++#define IFLA_MACVLAN_FLAGS 2 ++#define __IFLA_MACVLAN_MAX 3 ++ ++#define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1) ++#endif ++ + #if !HAVE_DECL_IFLA_PHYS_PORT_ID + #undef IFLA_PROMISCUITY + #define IFLA_PROMISCUITY 30 +-- +cgit v0.10.2 + diff --git a/patches/systemd-215/series b/patches/systemd-215/series index f0c8f0c..5ca7826 100644 --- a/patches/systemd-215/series +++ b/patches/systemd-215/series @@ -1,6 +1,5 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 0001-util.h-include-missing.h-for-MAX_HANDLE_SZ.patch 0002-missing-defined-extra-clock-ids.patch 0003-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch -# 69ccf43a69835ab1b39ba354f76f27f9 - git-ptx-patches magic +0004-IFLA_compile_fix.patch +0005-IFLA_MACVLAN_FLAGS.patch -- 1.7.9.5 -- ptxdist mailing list ptxdist@pengutronix.de