Skip to content

Commit

Permalink
net: fix a compile error when CONFIG_NET_LL_RX_POLL is not set
Browse files Browse the repository at this point in the history
When CONFIG_NET_LL_RX_POLL is not set, I got:

net/socket.c: In function ‘sock_poll’:
net/socket.c:1165:4: error: implicit declaration of function ‘sk_busy_loop’ [-Werror=implicit-function-declaration]

Fix this by adding a nop when !CONFIG_NET_LL_RX_POLL.

Cc: Eliezer Tamir <[email protected]>
Cc: David S. Miller <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Cong Wang authored and davem330 committed Aug 1, 2013
1 parent b305132 commit dfcefb0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/net/busy_poll.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,10 @@ static inline bool busy_loop_timeout(unsigned long end_time)
return true;
}

static inline bool sk_busy_loop(struct sock *sk, int nonblock)
{
return false;
}

#endif /* CONFIG_NET_LL_RX_POLL */
#endif /* _LINUX_NET_BUSY_POLL_H */

0 comments on commit dfcefb0

Please sign in to comment.