summaryrefslogtreecommitdiff
path: root/iputils_common.h
diff options
context:
space:
mode:
authorSami Kerola <kerolasa@iki.fi>2018-12-18 21:21:51 +0000
committerSami Kerola <kerolasa@iki.fi>2018-12-22 19:51:24 +0000
commit129fa3a980186d97e868885c0a764d8f5263bea3 (patch)
treecfbfc2e3fbdf7e0313a326e6863802cd36ac4948 /iputils_common.h
parent2615a527209bb408b54028ef6405075cadd4541b (diff)
downloadiputils-129fa3a980186d97e868885c0a764d8f5263bea3.tar.gz
common: move error() portability go-around to common library
This allows use of error() in other programs. The static common library can also be used for other utility functions in future. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'iputils_common.h')
-rw-r--r--iputils_common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/iputils_common.h b/iputils_common.h
index 40266bc..e48fa28 100644
--- a/iputils_common.h
+++ b/iputils_common.h
@@ -16,4 +16,10 @@
# define _(Text) Text
#endif
+#ifdef HAVE_ERROR_H
+# include <error.h>
+#else
+extern void error(int status, int errnum, const char *format, ...);
+#endif
+
#endif /* IPUTILS_COMMON_H */