Accomodate NetBSD
This commit is contained in:
parent
fea3228fec
commit
d079d563fc
1 changed files with 5 additions and 1 deletions
|
|
@ -16,6 +16,9 @@
|
||||||
#else
|
#else
|
||||||
# include <nfs/nfs.h>
|
# include <nfs/nfs.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __NetBSD__
|
||||||
|
# include <nfs/nfsmount.h>
|
||||||
|
#endif
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include "mountnfs.h"
|
#include "mountnfs.h"
|
||||||
#ifndef MNT_NOATIME
|
#ifndef MNT_NOATIME
|
||||||
|
|
@ -45,11 +48,12 @@ mountnfs(int proto, struct sockaddr_in *sa,
|
||||||
na.retrans = NFS_RETRANS;
|
na.retrans = NFS_RETRANS;
|
||||||
na.maxgrouplist = NFS_MAXGRPS;
|
na.maxgrouplist = NFS_MAXGRPS;
|
||||||
na.hostname = "backup";
|
na.hostname = "backup";
|
||||||
|
#ifndef __NetBSD__
|
||||||
na.acregmin = 60;
|
na.acregmin = 60;
|
||||||
na.acregmax = 600;
|
na.acregmax = 600;
|
||||||
na.acdirmin = 60;
|
na.acdirmin = 60;
|
||||||
na.acdirmax = 600;
|
na.acdirmax = 600;
|
||||||
|
#endif
|
||||||
mflag = MNT_RDONLY|MNT_NOSUID|MNT_NOATIME|MNT_NODEV;
|
mflag = MNT_RDONLY|MNT_NOSUID|MNT_NOATIME|MNT_NODEV;
|
||||||
if(mount("nfs", mtpt, mflag, &na) < 0)
|
if(mount("nfs", mtpt, mflag, &na) < 0)
|
||||||
sysfatal("mount: %r");
|
sysfatal("mount: %r");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue