diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2014-01-24 19:10:59 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2014-01-24 21:25:47 +0100 |
commit | da4800de7ee613026c4a074bbfe98186ec05b315 (patch) | |
tree | 340616d2ca3c4d5b0f96cc4fe2ab7c6ea04316e9 | |
parent | 37df17b87a3456812eab20a296aedb088c829ba0 (diff) |
backports: add __sockaddr_check_size()
This is used by net/bluetooth/l2cap_sock.c
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r-- | backport/backport-include/linux/socket.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/backport/backport-include/linux/socket.h b/backport/backport-include/linux/socket.h index 4187af23..8b6453ec 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 */ |