Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37761863
en ru br
Репозитории 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
www.altlinux.org/Changes

Группа :: Разработка/Ядро
Пакет: glibc-kernheaders

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 0004-uapi-fix-linux-vm_sockets.h-userspace-compilation-er.patch
Скачать


From c09e19afb7d3ab147e94f7fe6683b525e74dd01d 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/21] 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 68d57c5e99bc..2dbf39206f68 100644
--- a/include/uapi/linux/vm_sockets.h
+++ b/include/uapi/linux/vm_sockets.h
@@ -141,13 +141,14 @@
  * 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;
-	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)];
 };
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin