From 37df17b87a3456812eab20a296aedb088c829ba0 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 24 Jan 2014 17:57:19 +0100 Subject: [PATCH] backports: add DECLARE_SOCKADDR This is used by net/bluetooth/l2cap_sock.c Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/net.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backport/backport-include/linux/net.h b/backport/backport-include/linux/net.h index 9d7cbf553db8..07981dae7ae3 100644 --- a/backport/backport-include/linux/net.h +++ b/backport/backport-include/linux/net.h @@ -41,4 +41,9 @@ do { \ net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) #endif +#ifndef DECLARE_SOCKADDR +#define DECLARE_SOCKADDR(type, dst, src) \ + type dst = ({ __sockaddr_check_size(sizeof(*dst)); (type) src; }) +#endif + #endif /* __BACKPORT_LINUX_NET_H */ -- 2.30.2