aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vbackup
diff options
context:
space:
mode:
authorDavid du Colombier <0intro@gmail.com>2014-08-06 14:43:21 +0200
committerDavid du Colombier <0intro@gmail.com>2014-08-06 14:43:21 +0200
commit738e890b19eb560e557197aa59598a5e08983a28 (patch)
tree725ac7640e7545005b11b195acb5f70b4b23dc4a /src/cmd/vbackup
parenta9e0d2b6c47bbc509a5e318e6d61a832aabfc8bb (diff)
downloadplan9port-738e890b19eb560e557197aa59598a5e08983a28.tar.gz
plan9port-738e890b19eb560e557197aa59598a5e08983a28.tar.bz2
plan9port-738e890b19eb560e557197aa59598a5e08983a28.zip
vbackup: fix compilation on NetBSD (thanks Álvaro Jurado)
On NetBSD 5.0 and upper, mount() require data_len as a fifth argument. LGTM=rsc R=rsc CC=elbingmiss https://codereview.appspot.com/111600043
Diffstat (limited to 'src/cmd/vbackup')
-rw-r--r--src/cmd/vbackup/mount-BSD.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/vbackup/mount-BSD.c b/src/cmd/vbackup/mount-BSD.c
index 2d320b63..63841b5c 100644
--- a/src/cmd/vbackup/mount-BSD.c
+++ b/src/cmd/vbackup/mount-BSD.c
@@ -63,6 +63,10 @@ mountnfs(int proto, struct sockaddr_in *sa,
na.acdirmax = 600;
#endif
mflag = MNT_RDONLY|MNT_NOSUID|MNT_NOATIME|MNT_NODEV;
+#ifdef __NetBSD__
+ if(mount("nfs", mtpt, mflag, &na, sizeof(na)) < 0)
+#else
if(mount("nfs", mtpt, mflag, &na) < 0)
+#endif
sysfatal("mount: %r");
}