[PATCH 1/2] backports: explicitely include string.h from device.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
---
 backport/backport-include/linux/device.h |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h
index 29dc077..03ca1f1 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
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux