summaryrefslogtreecommitdiff
path: root/devel/bglibs/patches/patch-aa
blob: f42833fbc880c7891b92e34fce7915a76efd3776 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$NetBSD: patch-aa,v 1.2 2005/07/15 05:45:00 schmonz Exp $

--- bg-installer.c.orig	2005-07-11 00:47:35.000000000 -0400
+++ bg-installer.c
@@ -151,7 +151,7 @@ static void show(char type, unsigned uid
   obuf_endl(&outbuf);
 }
 
-static void setmode(const char* filename,
+static void bgsetmode(const char* filename,
 		    unsigned uid, unsigned gid, unsigned mode)
 {
   if (chown(filename, uid, gid) != 0)
@@ -201,7 +201,7 @@ static void c(unsigned uid, unsigned gid
     if (!ibuf_copytofd(&in, out)
 	|| close(out) != 0)
       diefsys(1, "{Could not write '}s{'}", pathtmp.s);
-    setmode(pathtmp.s, uid, gid, mode);
+    bgsetmode(pathtmp.s, uid, gid, mode);
     if (rename(pathtmp.s, path.s) != 0)
       diefsys(1, "{Could not rename '}s{' to '}s{'}", pathtmp.s, path.s);
     ibuf_close(&in);
@@ -224,7 +224,7 @@ static void d(unsigned uid, unsigned gid
     }
     else if (!S_ISDIR(st.st_mode))
       dief(1, "{Path '}s{' exists but is not a directory}", path.s);
-    setmode(path.s, uid, gid, mode);
+    bgsetmode(path.s, uid, gid, mode);
   }
 
   if (opt_check) {