View | Details | Raw Unified | Return to bug 253567 | Differences between
and this patch

Collapse All | Expand All

(-)files/patch-log.c (+10 lines)
Line 0 Link Here
1
--- log.c.orig	2000-06-22 22:55:13 UTC
2
+++ log.c
3
@@ -37,6 +37,7 @@
4
 #include <unistd.h>
5
 #include <syslog.h>
6
 #include <stdio.h>
7
+#include <stdlib.h>
8
 #include <stdarg.h>
9
 #include <errno.h>
10
 #include <signal.h>
(-)files/patch-main.c (+10 lines)
Line 0 Link Here
1
--- main.c.orig	2000-06-22 22:58:07 UTC
2
+++ main.c
3
@@ -24,6 +24,7 @@
4
 
5
 #include <time.h>
6
 #include <stdio.h>
7
+#include <stdlib.h>
8
 #include <unistd.h>
9
 #include <signal.h>
10
 #include <fcntl.h>
(-)files/patch-matchrx.c (-1 / +5 lines)
Lines 1-6 Link Here
1
--- matchrx.c.orig	2000-06-20 23:12:18 UTC
1
--- matchrx.c.orig	2000-06-20 23:12:18 UTC
2
+++ matchrx.c
2
+++ matchrx.c
3
@@ -23,6 +23,7 @@
3
@@ -23,9 +23,11 @@
4
 
4
 
5
 
5
 
6
 #include <stdio.h>
6
 #include <stdio.h>
Lines 8-10 Link Here
8
 #include <regex.h>
8
 #include <regex.h>
9
 #include <stdarg.h>
9
 #include <stdarg.h>
10
 #include <stdlib.h>
10
 #include <stdlib.h>
11
+#include <string.h>
12
 #include "matchrx.h"
13
 
14
 int
(-)files/patch-runjob.c (-2 / +11 lines)
Lines 9-16 Link Here
9
-    int fd, i;
9
-    int fd, i;
10
+    int fd;
10
+    int fd;
11
+    char name[] = "/tmp/anacron.XXXXXX";
11
+    char name[] = "/tmp/anacron.XXXXXX";
12
+
13
+    fd = mkstemp(name);
14
 
12
 
15
-    i = 0;
13
-    i = 0;
16
-    name = NULL;
14
-    name = NULL;
Lines 25-34 Link Here
25
-	/* I'm not sure we actually need to be so persistent here */
23
-	/* I'm not sure we actually need to be so persistent here */
26
-    } while (fd == -1 && errno == EEXIST && i < max_retries);
24
-    } while (fd == -1 && errno == EEXIST && i < max_retries);
27
-    
25
-    
26
+    fd = mkstemp(name);
27
+
28
     if (fd == -1) die_e("Can't open temporary file");
28
     if (fd == -1) die_e("Can't open temporary file");
29
     if (unlink(name)) die_e("Can't unlink temporary file");
29
     if (unlink(name)) die_e("Can't unlink temporary file");
30
-    free(name);
30
-    free(name);
31
+
31
+
32
     fcntl(fd, F_SETFD, 1);    /* set close-on-exec flag */
32
     fcntl(fd, F_SETFD, 1);    /* set close-on-exec flag */
33
     return fd;
33
     return fd;
34
 }
35
@@ -84,7 +72,7 @@ username()
36
 }
37
 
38
 static void
39
-xputenv(const char *s)
40
+xputenv(char *s)
41
 {
42
     if (putenv(s)) die_e("Can't set the environment");
34
 }
43
 }

Return to bug 253567