open with O_CREAT in second argument needs 3 arguments. 2009-03-05 Martin von Gagern Reference: https://bugs.gentoo.org/261283 Index: grass-6.3.0/raster/r.drain/main.c =================================================================== --- grass-6.3.0.orig/raster/r.drain/main.c +++ grass-6.3.0/raster/r.drain/main.c @@ -296,8 +296,8 @@ int main(int argc, char **argv) tempfile1 = G_tempfile(); tempfile2 = G_tempfile(); - fe = open(tempfile1, O_RDWR | O_CREAT); - fd = open(tempfile2, O_RDWR | O_CREAT); + fe = open(tempfile1, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); + fd = open(tempfile2, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); /* transfer the input map to a temp file */ for (i = 0; i < nrows; i++) { Index: grass-6.3.0/raster/r.fill.dir/main.c =================================================================== --- grass-6.3.0.orig/raster/r.fill.dir/main.c +++ grass-6.3.0/raster/r.fill.dir/main.c @@ -196,9 +196,9 @@ main(int argc, char **argv) tempfile2 = G_tempfile(); tempfile3 = G_tempfile(); - fe=open(tempfile1,O_RDWR|O_CREAT); /* elev */ - fd=open(tempfile2,O_RDWR|O_CREAT); /* dirn */ - fm=open(tempfile3,O_RDWR|O_CREAT); /* problems */ + fe=open(tempfile1,O_RDWR|O_CREAT, S_IRUSR|S_IWUSR); /* elev */ + fd=open(tempfile2,O_RDWR|O_CREAT, S_IRUSR|S_IWUSR); /* dirn */ + fm=open(tempfile3,O_RDWR|O_CREAT, S_IRUSR|S_IWUSR); /* problems */ G_message(_("Reading map...")); for(i=0;i