From da4800de7ee613026c4a074bbfe98186ec05b315 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 24 Jan 2014 19:10:59 +0100 Subject: [PATCH] backports: add __sockaddr_check_size() This is used by net/bluetooth/l2cap_sock.c Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/socket.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backport/backport-include/linux/socket.h b/backport/backport-include/linux/socket.h index 4187af231295..8b6453ec1417 100644 --- a/backport/backport-include/linux/socket.h +++ b/backport/backport-include/linux/socket.h @@ -10,4 +10,9 @@ #define SOL_NFC 280 #endif +#ifndef __sockaddr_check_size +#define __sockaddr_check_size(size) \ + BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage))) +#endif + #endif /* __BACKPORT_SOCKET_H */ -- 2.30.2