Skip to content

Commit

Permalink
net: Avoid compiler warning for mmsghdr when CONFIG_COMPAT is not sel…
Browse files Browse the repository at this point in the history
…ected

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Oct 20, 2009
1 parent d19742f commit 7488797
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/net/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *);
extern int compat_sock_get_timestampns(struct sock *, struct timespec __user *);

#else /* defined(CONFIG_COMPAT) */
#define compat_msghdr msghdr /* to avoid compiler warnings */
/*
* To avoid compiler warnings:
*/
#define compat_msghdr msghdr
#define compat_mmsghdr mmsghdr
#endif /* defined(CONFIG_COMPAT) */

extern int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *);
Expand Down

0 comments on commit 7488797

Please sign in to comment.