b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Sven Eckelmann <sven@narfation.org>
Subject: [PATCH 1/2] batman-adv: compat: Add support for linux/kstrtox.h
Date: Fri, 23 Jul 2021 19:23:16 +0200	[thread overview]
Message-ID: <20210723172317.323199-1-sven@narfation.org> (raw)

The commit 4c52729377ea ("kernel.h: split out kstrtox() and simple_strtox()
to a separate header") moved the kstrtou64 function to a new header called
linux/kstrtox.h.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 compat-include/linux/kstrtox.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 compat-include/linux/kstrtox.h

diff --git a/compat-include/linux/kstrtox.h b/compat-include/linux/kstrtox.h
new file mode 100644
index 00000000..cd152e4b
--- /dev/null
+++ b/compat-include/linux/kstrtox.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/* Copyright (C) B.A.T.M.A.N. contributors:
+ *
+ * Marek Lindner, Simon Wunderlich
+ *
+ * This file contains macros for maintaining compatibility with older versions
+ * of the Linux kernel.
+ */
+
+#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_KSTRTOX_H_
+#define _NET_BATMAN_ADV_COMPAT_LINUX_KSTRTOX_H_
+
+#include <linux/version.h>
+#if LINUX_VERSION_IS_GEQ(5, 14, 0)
+#include_next <linux/kstrtox.h>
+#else
+#include <linux/kernel.h>
+#endif
+
+#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_KSTRTOX_H_ */
-- 
2.30.2


             reply	other threads:[~2021-07-23 17:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 17:23 Sven Eckelmann [this message]
2021-07-23 17:23 ` [PATCH 2/2] batman-adv: Switch to kstrtox.h for kstrtou64 Sven Eckelmann

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=20210723172317.323199-1-sven@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /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;
as well as URLs for NNTP newsgroup(s).