Репозитории ALT
S: | 6.5-alt1 |
5.1: | 2.6.29-alt3 |
4.1: | 2.6.24-alt4 |
4.0: | 2.6.17-alt6 |
3.0: | 2.4.25-alt2 |
Группа :: Разработка/Ядро
Пакет: glibc-kernheaders
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: 0004-uapi-fix-linux-vm_sockets.h-userspace-compilation-er.patch
Скачать
Скачать
From b7b40f64212e8cac3d81fe3b2301df562be1ffd7 Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Thu, 23 Feb 2017 23:47:00 +0000
Subject: [PATCH 04/15] uapi: fix linux/vm_sockets.h userspace compilation
errors
Use __kernel_sa_family_t instead of sa_family_t and __SOCK_SIZE__
instead of sizeof(struct sockaddr) the same way as uapi/linux/in.h does,
to fix the following linux/vm_sockets.h userspace compilation errors:
/usr/include/linux/vm_sockets.h:148:32: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr'
unsigned char svm_zero[sizeof(struct sockaddr) -
/usr/include/linux/vm_sockets.h:149:18: error: 'sa_family_t' undeclared here (not in a function)
sizeof(sa_family_t) -
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
include/uapi/linux/vm_sockets.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/vm_sockets.h b/include/uapi/linux/vm_sockets.h
index 46918a1852d7..353d61bb1827 100644
--- a/include/uapi/linux/vm_sockets.h
+++ b/include/uapi/linux/vm_sockets.h
@@ -164,14 +164,15 @@
* of this structure should be exactly the same as that of struct sockaddr.
*/
+#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */
struct sockaddr_vm {
__kernel_sa_family_t svm_family;
unsigned short svm_reserved1;
unsigned int svm_port;
unsigned int svm_cid;
__u8 svm_flags;
- unsigned char svm_zero[sizeof(struct sockaddr) -
- sizeof(sa_family_t) -
+ unsigned char svm_zero[__SOCK_SIZE__ -
+ sizeof(__kernel_sa_family_t) -
sizeof(unsigned short) -
sizeof(unsigned int) -
sizeof(unsigned int) -