From 4a43f69ce488193b7019efc828acc44b73e78d4e Mon Sep 17 00:00:00 2001 From: Tom Jones Date: Wed, 11 Sep 2024 15:42:32 +0000 Subject: vppinfra: exclude clib_dt_node_add_child on FreeBSD clib_dt_read_from_sysfs is the only user of clib_dt_node_add_child, on FreeBSD this causes a build failure due to an unused function. Place clib_dt_node_add_child behind an include guard for linux only. Type: fix Change-Id: I9641ffd10d9d15e1e552f570cd386211d3b4ab39 Signed-off-by: Tom Jones (cherry picked from commit 33fec83487b3f88203b0a854f7aec89d6e405cd7) --- src/vppinfra/devicetree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vppinfra/devicetree.c b/src/vppinfra/devicetree.c index 9bf8eeeac6c..b725d5a0aed 100644 --- a/src/vppinfra/devicetree.c +++ b/src/vppinfra/devicetree.c @@ -11,8 +11,6 @@ #include #include -#endif - static_always_inline clib_dt_node_t * clib_dt_node_add_child (clib_dt_main_t *dm, clib_dt_node_t *n, char *name) { @@ -42,6 +40,7 @@ clib_dt_node_add_child (clib_dt_main_t *dm, clib_dt_node_t *n, char *name) return cn; } +#endif void clib_dt_main_free (clib_dt_main_t *dm) -- cgit 1.2.3-korg