summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vorel <petr.vorel@gmail.com>2021-08-27 00:13:59 +0200
committerPetr Vorel <petr.vorel@gmail.com>2021-08-27 00:17:39 +0200
commita0b39174e3aeb62aacc62664815bf633a2cdd1c0 (patch)
tree59d268118978da0a0e91057cdf015802ad137ec5
parent085d03081989ea5293c4755d49f2b4bdd0238478 (diff)
downloadiputils-a0b39174e3aeb62aacc62664815bf633a2cdd1c0.tar.gz
ninfod: Fix build with -DNINFOD_MESSAGES=false
This fixes build error: $ rm -rf builddir/; meson builddir -DNINFOD_MESSAGES=false && make ... ninfod/ninfod.c:201: undefined reference to `DEBUG' Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
-rw-r--r--ninfod/ninfod.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ninfod/ninfod.c b/ninfod/ninfod.c
index aa3cd79..122e485 100644
--- a/ninfod/ninfod.c
+++ b/ninfod/ninfod.c
@@ -169,6 +169,10 @@ void DEBUG(int const pri, char const *const fmt, ...)
}
errno = saved_errno;
}
+#else
+iputils_attribute_format(__printf__, 2, 3)
+void DEBUG(int const pri __attribute__ ((unused)), char const *const fmt __attribute__ ((unused)), ...)
+{}
#endif
/* --------- */