diff options
author | John Levon <john.levon@joyent.com> | 2018-10-15 14:57:13 +0000 |
---|---|---|
committer | John Levon <john.levon@joyent.com> | 2018-10-15 14:57:13 +0000 |
commit | f5733417953d12d5f4b44353b59c3b14f13696c2 (patch) | |
tree | 3e8c4bc1ee61164386f7dfc70c4b8b760731d843 /usr/src/tools/ctf | |
parent | 8bd1e5ed2443eb501ddfba4147e769b6d0074ef3 (diff) | |
parent | f35f236324c07bf560ad6481307ea93b1261d636 (diff) | |
download | illumos-joyent-gcc-update.tar.gz |
Merge remote-tracking branch 'ctf/OS-7275' into gcc-updategcc-update
Diffstat (limited to 'usr/src/tools/ctf')
-rw-r--r-- | usr/src/tools/ctf/common/ctf_headers.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr/src/tools/ctf/common/ctf_headers.h b/usr/src/tools/ctf/common/ctf_headers.h index 7cad0d2a27..572fb03d4d 100644 --- a/usr/src/tools/ctf/common/ctf_headers.h +++ b/usr/src/tools/ctf/common/ctf_headers.h @@ -64,12 +64,12 @@ * when <sys/ctf_api.h> is included via a nested #include rather than * an explicit path #include. * - * Finally, to make life easier, we also include the current definitions of the - * ccompile.h and sysmacros.h headers to make it so we have to rely less on the - * build system contents. + * We'll also include the local ccompile.h - older build systems often lack + * useful definitions like __unused. Finally, we'll also define ARRAY_SIZE: + * unfortunately, older systems sysmacros.h only have this defined for the + * kernel, and we can't easily pick it up otherwise. */ -#include <uts/common/sys/sysmacros.h> #include <uts/common/sys/ccompile.h> #include <uts/common/sys/ctf.h> #include <uts/common/sys/ctf_api.h> @@ -77,4 +77,8 @@ #include <lib/libctf/common/libctf.h> #include <lib/libctf/common/libctf_impl.h> +#if !defined(ARRAY_SIZE) +#define ARRAY_SIZE(x) (sizeof (x) / sizeof (x[0])) +#endif + #endif /* _CTF_HEADERS_H */ |