static void idtonameres(struct idmap_msg *);
static void nametoidres(struct idmap_msg *);
-static int nfsdopen();
+static int nfsdopen(void);
static int nfsdopenone(struct idmap_client *);
static void nfsdreopen(void);
size_t strlcat(char *, const char *, size_t);
size_t strlcpy(char *, const char *, size_t);
-ssize_t atomicio(ssize_t (*)(), int, void *, size_t);
+ssize_t atomicio(ssize_t (*f) (int, void*, size_t),
+ int, void *, size_t);
void mydaemon(int, int);
-void release_parent();
+void release_parent(void);
static int verbose = 0;
#define DEFAULT_IDMAP_CACHE_EXPIRY 600 /* seconds */
bsiz = sizeof(buf) - bsiz;
- if (atomicio(write, ic->ic_fd, buf, bsiz) != bsiz)
+ if (atomicio((void*)write, ic->ic_fd, buf, bsiz) != bsiz)
idmapd_warnx("nfsdcb: write(%s) failed: errno %d (%s)",
ic->ic_path, errno, strerror(errno));
if (im.im_status == IDMAP_STATUS_LOOKUPFAIL)
im.im_status = IDMAP_STATUS_SUCCESS;
- if (atomicio(write, ic->ic_fd, &im, sizeof(im)) != sizeof(im))
+ if (atomicio((void*)write, ic->ic_fd, &im, sizeof(im)) != sizeof(im))
idmapd_warn("nfscb: write(%s)", ic->ic_path);
out:
event_add(&ic->ic_event, NULL);
}
static int
-nfsdopen()
+nfsdopen(void)
{
return ((nfsdopenone(&nfsd_ic[IC_NAMEID]) == 0 &&
nfsdopenone(&nfsd_ic[IC_IDNAME]) == 0) ? 0 : -1);
return;
}
void
-release_parent()
+release_parent(void)
{
int status;
"mount to NFS server '%s' failed: ", server);
else
pos = snprintf(tmp, (erreob - tmp),
- "%s: mount to NFS server '%s' failed: ", server);
+ "%s: mount to NFS server '%s' failed: ",
+ progname, server);
tmp = &errbuf[pos];
if (rpc_createerr.cf_stat == RPC_TIMEDOUT) {