Both xdr_uid_t and xdr_gid_t are defined in usr/src/lib/libnsl/rpc/authsys_prot.c (in libnsl library; for userland) and in usr/src/uts/common/rpc/sec/authu_prot.c (in rpcsec module; for kernel). The prototypes are declared in usr/src/uts/common/rpc/auth_sys.h (for both kernel and libnsl).
There are few places in the illumos sources where we have duplicate declarations of xdr_uid_t/xdr_gid_t. They are not needed there, so we should remove them.
In addition, in both nfsauth_xdr.c and nfs_auth_xdr.c there are XDR functions working with UIDs/GIDs, but instead of xdr_uid_t/xdr_gid_t, the xdr_u_int() is used.