]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use static inline for iface_{setup,delete}_addr in tests/sys/net/routing.
authordim <dim@FreeBSD.org>
Sat, 8 Aug 2020 11:06:27 +0000 (11:06 +0000)
committerdim <dim@FreeBSD.org>
Sat, 8 Aug 2020 11:06:27 +0000 (11:06 +0000)
commit87e047995ed02fb01ba0e0800358cfc0a29c783a
tree6b3060ae7cd9c9eb0c20f9989bf1dbbc45fcf5ef
parent852518f98d81b4b03e8407aba8744527058e003c
Use static inline for iface_{setup,delete}_addr in tests/sys/net/routing.

This fixes possible link errors, similar to:

ld: error: undefined symbol: iface_setup_addr
>>> referenced by test_rtsock_l3.c:111 (tests/sys/net/routing/test_rtsock_l3.c:111)
>>>               test_rtsock_l3.o:(presetup_ipv4)
>>> referenced by test_rtsock_l3.c:79 (tests/sys/net/routing/test_rtsock_l3.c:79)
>>>               test_rtsock_l3.o:(presetup_ipv6)
>>> referenced by test_rtsock_l3.c:512 (tests/sys/net/routing/test_rtsock_l3.c:512)
>>>               test_rtsock_l3.o:(atfu_rtm_change_v4_gw_success_body)
>>> referenced 10 more times

In C (not C++), 'naked' inline is almost always a mistake. Either use
static inline (this is appropriate for most cases), or extern inline.

MFC after: 3 days
tests/sys/net/routing/rtsock_common.h