mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Tim Sander <tim@krieglstein.org>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] systemd: support for older kernel headers taken from upstream
Date: Wed, 06 Aug 2014 09:25:43 +0200	[thread overview]
Message-ID: <1560862.Hm7u1ZRiUj@dabox> (raw)

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?= <zbyszek@in.waw.pl>
+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 <linux/loop.h>
+ ]])
+ 
+-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

                 reply	other threads:[~2014-08-06  7:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1560862.Hm7u1ZRiUj@dabox \
    --to=tim@krieglstein.org \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox