diff options
author | Josh Rickmar <jrick@devio.us> | 2012-07-05 11:33:46 -0400 |
---|---|---|
committer | Josh Rickmar <jrick@devio.us> | 2012-07-05 11:33:46 -0400 |
commit | a5b5e1de045cab38f969984f66addc840a7fb89c (patch) | |
tree | 39b1923e005e225995da69d2400f6f7763c08934 | |
parent | b945618ede3c36d40a364a2907b58d3622c4658e (diff) | |
download | xombrero-a5b5e1de045cab38f969984f66addc840a7fb89c.tar.gz |
Fix build on linux
-rw-r--r-- | linux/util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/util.h b/linux/util.h index 2f329bb..cce1453 100644 --- a/linux/util.h +++ b/linux/util.h @@ -39,6 +39,14 @@ int fmt_scaled(long long number, char *result); #define TAILQ_END(head) NULL #endif +#ifndef TAILQ_FOREACH_SAFE +#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = TAILQ_FIRST(head); \ + (var) != TAILQ_END(head) && \ + ((tvar) = TAILQ_NEXT(var, field), 1); \ + (var) = (tvar)) +#endif + /* * fmt_scaled(3) specific flags. (from OpenBSD util.h) */ |