fix for 64-bit arch:

use %zd to print size_t types and sizeof()

Approved by:	alfred
Tested on:	sparc64, amd64
This commit is contained in:
rees 2004-03-26 22:44:59 +00:00
parent b05f0288da
commit d5e8f62700
2 changed files with 2 additions and 5 deletions

View File

@ -215,7 +215,7 @@ idmap_service(struct idmap_e * e)
}
if (e->msg.msg_len != sizeof(struct idmap_msg)) {
fprintf(stderr, "bad message length: %d/%d\n", e->msg.msg_len,
fprintf(stderr, "bad message length: %zd/%zd\n", e->msg.msg_len,
sizeof(struct idmap_msg));
return -1;
}
@ -355,9 +355,6 @@ main(int argc, char ** argv)
if (!verbose)
daemon(0,0);
if (verbose)
printf("sizeof nfs4dev_msg: %d\n", sizeof(struct nfs4dev_msg));
maxfd = fd;
for (;;) {
struct timeval timo = {1, 0};

View File

@ -47,7 +47,7 @@ struct nfs4dev_msg {
uint8_t msg_data[NFS4DEV_MSG_MAX_DATALEN];
};
#define NFS4DEV_VERSION (0x3 << 16 | sizeof(struct nfs4dev_msg))
#define NFS4DEV_VERSION (0x3 << 16 | (int) sizeof(struct nfs4dev_msg))
/* ioctl commands */
#define NFS4DEVIOCGET _IOR('A', 0x200, struct nfs4dev_msg)