From: Hauke Mehrtens Date: Fri, 24 Jan 2014 16:57:19 +0000 (+0100) Subject: backports: add DECLARE_SOCKADDR X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=37df17b87a3456812eab20a296aedb088c829ba0;p=openwrt%2Fstaging%2Fblogic.git backports: add DECLARE_SOCKADDR This is used by net/bluetooth/l2cap_sock.c Signed-off-by: Hauke Mehrtens --- 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 */