summaryrefslogtreecommitdiff
blob: 922369ca48c5694e821c91a2f3e66136eb076380 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
Bug: https://bugs.gentoo.org/897946
Don't use sig_unblock and other such functions, they are deprecated.
--- a/src/cdb_make.c
+++ b/src/cdb_make.c
@@ -15,7 +15,7 @@ int cdb_make_start(struct cdb_make *c,int fd)
   c->numentries = 0;
   c->fd = fd;
   c->pos = sizeof c->final;
-  buffer_init(&c->b,write,fd,c->bspace,sizeof c->bspace);
+  buffer_init(&c->b,(void *)write,fd,c->bspace,sizeof c->bspace);
   return seek_set(fd,c->pos);
 }
 
--- a/src/pathexec_run.c
+++ b/src/pathexec_run.c
@@ -1,5 +1,6 @@
 /* Public domain. */
 
+#include <unistd.h>
 #include "error.h"
 #include "stralloc.h"
 #include "str.h"
--- a/src/prot.c
+++ b/src/prot.c
@@ -1,5 +1,7 @@
 /* Public domain. */
 
+#include <grp.h>
+#include <unistd.h>
 #include "hasshsgr.h"
 #include "prot.h"
 
--- a/src/seek_set.c
+++ b/src/seek_set.c
@@ -1,6 +1,7 @@
 /* Public domain. */
 
 #include <sys/types.h>
+#include <unistd.h>
 #include "seek.h"
 
 #define SET 0 /* sigh */
--- a/src/sig_block.c
+++ b/src/sig_block.c
@@ -6,35 +6,23 @@
 
 void sig_block(int sig)
 {
-#ifdef HASSIGPROCMASK
   sigset_t ss;
   sigemptyset(&ss);
   sigaddset(&ss,sig);
   sigprocmask(SIG_BLOCK,&ss,(sigset_t *) 0);
-#else
-  sigblock(1 << (sig - 1));
-#endif
 }
 
 void sig_unblock(int sig)
 {
-#ifdef HASSIGPROCMASK
   sigset_t ss;
   sigemptyset(&ss);
   sigaddset(&ss,sig);
   sigprocmask(SIG_UNBLOCK,&ss,(sigset_t *) 0);
-#else
-  sigsetmask(sigsetmask(~0) & ~(1 << (sig - 1)));
-#endif
 }
 
 void sig_blocknone(void)
 {
-#ifdef HASSIGPROCMASK
   sigset_t ss;
   sigemptyset(&ss);
   sigprocmask(SIG_SETMASK,&ss,(sigset_t *) 0);
-#else
-  sigsetmask(0);
-#endif
 }
--- a/src/sig_pause.c
+++ b/src/sig_pause.c
@@ -6,11 +6,7 @@
 
 void sig_pause(void)
 {
-#ifdef HASSIGPROCMASK
   sigset_t ss;
   sigemptyset(&ss);
   sigsuspend(&ss);
-#else
-  sigpause(0);
-#endif
 }
Binary files a/src/sig_pause.o and b/src/sig_pause.o differ
--- a/src/udpsvd.c
+++ b/src/udpsvd.c
@@ -268,7 +268,7 @@ int main(int argc, const char **argv, const char *const *envp) {
     if (user) {
       bufnum[fmt_ulong(bufnum, ugid.uid)] =0;
       out(", uid "); out(bufnum);
-      bufnum[fmt_ulong(bufnum, ugid.gid)] =0;
+      bufnum[fmt_ulong(bufnum, (unsigned long) ugid.gid)] =0;
       out(", gid "); out(bufnum);
     }
     flush(", starting.\n");
--- a/src/chkshsgr.c
+++ b/src/chkshsgr.c
@@ -1,5 +1,7 @@
 /* Public domain. */
 
+#define _GNU_SOURCE
+#include <grp.h>
 #include <unistd.h>
 
 int main()
--- a/src/tcpsvd.c
+++ b/src/tcpsvd.c
@@ -1,6 +1,8 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
+#define _GNU_SOURCE
+#include <grp.h>
 #include <unistd.h>
 #include "dns.h"
 #include "socket.h"
--- a/src/udpsvd.c
+++ b/src/udpsvd.c
@@ -1,7 +1,9 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
+#define _GNU_SOURCE
 #include <unistd.h>
+#include <grp.h>
 #include "dns.h"
 #include "socket.h"
 #include "ip4.h"