commit | 283f1bafdd49869a8458cab13d2a26a06db24d29 | [log] [tgz] |
---|---|---|
author | Jim Schaad <ietf@augustcellars.com> | Fri Dec 18 19:09:49 2015 -0800 |
committer | Jim Schaad <ietf@augustcellars.com> | Fri Dec 18 19:09:49 2015 -0800 |
tree | 9220ce294e2b86799f1fe13849cd7a534e40bd0e | |
parent | 2119d4a7529036b9a7231648f3e0771be22dcba9 [diff] |
gcc does not have _countof?
diff --git a/dumper/dumper.c b/dumper/dumper.c index 2de2b2b..b6109d8 100644 --- a/dumper/dumper.c +++ b/dumper/dumper.c
@@ -9,6 +9,10 @@ #include <string.h> #include <stdarg.h> +#ifndef _countof +#define _countf(x) (sizeof(x)/sizeof(x[0])) +#endif + typedef struct _FOO { char * fieldName; int type;