diff options
author | Toomas Soome <tsoome@me.com> | 2021-12-27 13:43:02 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2022-01-11 19:25:57 +0200 |
commit | 19f828dfeb540cb7af7e68528aa8711911d3ed39 (patch) | |
tree | 804077e837df17909f17a9d89b0f7926967cf8ec /usr/src/cmd/cmd-inet/usr.sbin/snoop | |
parent | 6a9d71e52548eedf5ce59148e7e6b8ce5f61a4a0 (diff) | |
download | illumos-joyent-19f828dfeb540cb7af7e68528aa8711911d3ed39.tar.gz |
14378 cmd-inet: build errors with gcc 11
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Andy Fiddaman <andy@omnios.org>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/cmd/cmd-inet/usr.sbin/snoop')
-rw-r--r-- | usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_nfs4.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_nfs4.c b/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_nfs4.c index 40a169e931..99dc870ecd 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_nfs4.c +++ b/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_nfs4.c @@ -46,6 +46,7 @@ #include <sys/stat.h> #include <sys/param.h> +#include <sys/sysmacros.h> #include <rpcsvc/nfs_prot.h> /* use the same nfs4_prot.h as the xdr code */ #include "rpcsvc/nfs4_prot.h" @@ -248,7 +249,7 @@ static op_info_t cb_opcode_info[] = { sumarg_cb_recall, sum_nfsstat4, dtlarg_cb_recall, dtl_nfsstat4}, }; -static uint_t cb_num_opcodes = sizeof (cb_opcode_info) / sizeof (op_info_t *); +static uint_t cb_num_opcodes = ARRAY_SIZE(cb_opcode_info); static op_info_t opcode_info[] = { {"OP_ZERO", NULL, NULL, NULL, NULL}, /* 0 */ @@ -339,7 +340,7 @@ static op_info_t opcode_info[] = { sumarg_release_lkown, sum_nfsstat4, dtlarg_release_lkown, dtl_nfsstat4}, }; -static uint_t num_opcodes = sizeof (opcode_info) / sizeof (op_info_t *); +static uint_t num_opcodes = ARRAY_SIZE(opcode_info); /* * File types. |