aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/devicetree.c
diff options
context:
space:
mode:
authorTom Jones <thj@freebsd.org>2024-09-11 15:42:32 +0000
committerDamjan Marion <dmarion@0xa5.net>2024-09-26 13:03:21 +0000
commit4a43f69ce488193b7019efc828acc44b73e78d4e (patch)
treecd2f7e36351c2f4b10702dd7bd1dff94f829509f /src/vppinfra/devicetree.c
parent45bd5786b1f6c1fb89ba177e3b6e3fd05db36ffb (diff)
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 <thj@freebsd.org> (cherry picked from commit 33fec83487b3f88203b0a854f7aec89d6e405cd7)
Diffstat (limited to 'src/vppinfra/devicetree.c')
-rw-r--r--src/vppinfra/devicetree.c3
1 files changed, 1 insertions, 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 <fcntl.h>
#include <dirent.h>
-#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)