about summary refs log tree commit diff stats
path: root/linux/util.h
diff options
context:
space:
mode:
authorEdd Barrett <vext01@gmail.com>2010-12-16 14:17:03 +0000
committerEdd Barrett <vext01@gmail.com>2010-12-16 14:17:03 +0000
commit480cd4932f60be79c7e6cab4b2136cb4292c3db6 (patch)
treeeb6496bf4087329459505a4b65818d481d3c373b /linux/util.h
parent30653cbfd65cf93426f8cc56b73d0d39631c6f91 (diff)
downloadxombrero-480cd4932f60be79c7e6cab4b2136cb4292c3db6.tar.gz
Fix linux build. Linux does not have fmt_scaled() or tree.h, so we have copied
them over from OpenBSD.

OK marco@
Diffstat (limited to 'linux/util.h')
-rw-r--r--linux/util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux/util.h b/linux/util.h
index 2b4cc6a..d0ad170 100644
--- a/linux/util.h
+++ b/linux/util.h
@@ -14,6 +14,8 @@ char   *fparseln(FILE *, size_t *, size_t *, const char [3], int);
 
 long long strtonum(const char *, long long, long long, const char **);
 
+int	fmt_scaled(long long number, char *result);
+
 #ifndef WAIT_ANY
 #define WAIT_ANY		(-1)
 #endif
@@ -22,3 +24,8 @@ long long strtonum(const char *, long long, long long, const char **);
 #ifndef TAILQ_END
 #define	TAILQ_END(head)			NULL
 #endif
+
+/*
+ * fmt_scaled(3) specific flags. (from OpenBSD util.h)
+ */
+#define FMT_SCALED_STRSIZE	7	/* minus sign, 4 digits, suffix, null byte */