summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Olivari <mathieu@qca.qualcomm.com>2015-01-12 18:17:55 -0800
committerHauke Mehrtens <hauke@hauke-m.de>2015-01-23 23:52:26 +0100
commit2917b32e70d29471e52945e7d091ee7fe612f55b (patch)
tree75dc6acb718e95444a54a1280ae14f282f654957
parent69e344227777cad5d66f3ebd8ba87a7859b0ad30 (diff)
backports: explicitely include string.h from device.h
string.h is usually included from the asm/ folder in most configuration, but on some older kernels and non-x86 architecture, this inclusion is not necessarily happening. As we're using memcpy() in the code below, we need to be safe and make sure string.h is indeed there. This issue has been observed on a 3.4 vendor kernels, but may be applicable to other configurations. Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--backport/backport-include/linux/device.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h
index 29dc0771..03ca1f17 100644
--- a/backport/backport-include/linux/device.h
+++ b/backport/backport-include/linux/device.h
@@ -5,6 +5,13 @@
#include <linux/version.h>
+/*
+ * string.h is usually included from the asm/ folder in most configuration,
+ * but on some older kernels it doesn't. As we're using memcpy() in the code
+ * below, we need to be safe and make sure string.h is indeed there.
+ */
+#include <linux/string.h>
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
/* backport
* commit 9f3b795a626ee79574595e06d1437fe0c7d51d29