selftests: txtimestamp: fix compilation issue
stable inclusion from stable-5.10.17 commit 25c312214d9f7b0876892b5997a167c0a9a21c7d bugzilla: 48169 -------------------------------- [ Upstream commit 647b8dd5 ] PACKET_TX_TIMESTAMP is defined in if_packet.h but it is not included in test. Include it instead of <netpacket/packet.h> otherwise the error of redefinition arrives. Also fix the compiler warning about ambiguous control flow by adding explicit braces. Fixes: 8fe2f761 ("net-timestamp: expand documentation") Suggested-by: NWillem de Bruijn <willemdebruijn.kernel@gmail.com> Signed-off-by: NVadim Fedorenko <vfedorenko@novek.ru> Acked-by: NWillem de Bruijn <willemb@google.com> Link: https://lore.kernel.org/r/1612461034-24524-1-git-send-email-vfedorenko@novek.ruSigned-off-by: NJakub Kicinski <kuba@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Showing
想要评论请 注册 或 登录