summaryrefslogtreecommitdiff
path: root/backport/backport-include
diff options
context:
space:
mode:
authorWinnie Chang <Winnie.Chang@cypress.com>2018-09-19 10:51:15 +0000
committerJohannes Berg <johannes.berg@intel.com>2018-09-24 09:19:50 +0200
commitedd669e066483e89de8e4eba6bcc4583f4d01322 (patch)
tree0221be01e1cc770adf2d260a245b398809337a4a /backport/backport-include
parent597b069775efd9c0c87de93c71d8914757f29ce9 (diff)
backports: add strreplace()
wireless-drivers-next.git commit cb18e2e9ec71 (brcmfmac: fix wrong strnchr usage) used strreplace(), which is not available in kernel prior to v4.2. Before this commit proprgates to linux-stable.git, add strreplace() to avoid gentree failure. Signed-off-by: Winnie Chang <winnie.chang@cypress.com> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport/backport-include')
-rw-r--r--backport/backport-include/linux/string.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/backport/backport-include/linux/string.h b/backport/backport-include/linux/string.h
index b85d9c73..4b35eb9f 100644
--- a/backport/backport-include/linux/string.h
+++ b/backport/backport-include/linux/string.h
@@ -29,4 +29,8 @@ void memzero_explicit(void *s, size_t count);
ssize_t strscpy(char *dest, const char *src, size_t count);
#endif
+#if LINUX_VERSION_IS_LESS(4,2,0)
+char *strreplace(char *s, char old, char new);
+#endif
+
#endif /* __BACKPORT_LINUX_STRING_H */