Home Home > GIT Browse > stable-xen
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2017-08-16 08:10:27 -0400
committerJeff Mahoney <jeffm@suse.com>2017-08-16 08:10:27 -0400
commitf3a7fff43441b9c0abaa50d6296021069c11cc0f (patch)
treed633b0b170f4c9ab86a55f7efae3a209ff6a2f0a
parent40ae810f881c39b15583b7209cb56237d21719d5 (diff)
parentfe56e414dcf998da0797a34a0f39d3d442cd1161 (diff)
Merge remote-tracking branch 'origin/users/lduncan/master/for-next'
-rw-r--r--patches.suse/uapi-add-a-compatibility-layer-between-linux-uio-h-and-glibc64
-rw-r--r--series.conf1
2 files changed, 65 insertions, 0 deletions
diff --git a/patches.suse/uapi-add-a-compatibility-layer-between-linux-uio-h-and-glibc b/patches.suse/uapi-add-a-compatibility-layer-between-linux-uio-h-and-glibc
new file mode 100644
index 0000000000..53e1c0eb95
--- /dev/null
+++ b/patches.suse/uapi-add-a-compatibility-layer-between-linux-uio-h-and-glibc
@@ -0,0 +1,64 @@
+From: Dmitry V. Levin <ldv@altlinux.org>
+Date: Feb. 22, 2017, 2:29 a.m.
+Subject: uapi: add a compatibility layer between linux/uio.h and glibc
+References: bsc#1053501
+Patch-mainline: Not yet, submitted 2/22/2017 to lkml
+
+Do not define struct iovec in linux/uio.h when <sys/uio.h> or <fcntl.h>
+is already included and provides these definitions.
+
+This fixes the following compilation error when <sys/uio.h> or <fcntl.h>
+is included before <linux/uio.h>:
+
+/usr/include/linux/uio.h:16:8: error: redefinition of 'struct iovec'
+
+Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
+Acked-by: Lee Duncan <lduncan@suse.com>
+---
+
+Acked-by: Lee Duncan <lduncan@suse.com>
+---
+ include/uapi/linux/libc-compat.h | 10 ++++++++++
+ include/uapi/linux/uio.h | 3 +++
+ 2 files changed, 13 insertions(+)
+
+--- a/include/uapi/linux/libc-compat.h
++++ b/include/uapi/linux/libc-compat.h
+@@ -205,6 +205,16 @@
+ #define __UAPI_DEF_IPX_CONFIG_DATA 1
+ #define __UAPI_DEF_IPX_ROUTE_DEF 1
+
++/* Coordinate with glibc bits/uio.h header. */
++#if defined(_SYS_UIO_H) || defined(_FCNTL_H)
++#define __UAPI_DEF_IOVEC 0
++#else
++#define __UAPI_DEF_IOVEC 1
++#endif
++
++/* Definitions for uio.h */
++#define __UAPI_DEF_IOVEC 1
++
+ /* Definitions for xattr.h */
+ #define __UAPI_DEF_XATTR 1
+
+--- a/include/uapi/linux/uio.h
++++ b/include/uapi/linux/uio.h
+@@ -9,15 +9,18 @@
+ #ifndef _UAPI__LINUX_UIO_H
+ #define _UAPI__LINUX_UIO_H
+
++#include <linux/libc-compat.h>
+ #include <linux/compiler.h>
+ #include <linux/types.h>
+
+
++#if __UAPI_DEF_IOVEC
+ struct iovec
+ {
+ void __user *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */
+ __kernel_size_t iov_len; /* Must be size_t (1003.1g) */
+ };
++#endif /* __UAPI_DEF_IOVEC */
+
+ /*
+ * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
diff --git a/series.conf b/series.conf
index 32ea2d1a6b..97bc7b073d 100644
--- a/series.conf
+++ b/series.conf
@@ -237,6 +237,7 @@
########################################################
# Not upstream yet
+ patches.suse/uapi-add-a-compatibility-layer-between-linux-uio-h-and-glibc
# SUSE-specific
patches.suse/btrfs-provide-super_operations-get_inode_dev