summarylogtreecommitdiffstats
path: root/headers.patch
blob: b7c10e3da6069277d3997405be64184fdb63cee1 (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
add missing headers for misc funcs and types

--- a/chkshsgr.c
+++ b/chkshsgr.c
@@ -1,10 +1,11 @@
 /* Public domain. */
 
 #include <unistd.h>
+#include <grp.h>
 
 int main()
 {
-  short x[4];
+  gid_t x[4];
 
   x[0] = x[1] = 0;
   if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1);
--- a/pathexec_run.c
+++ b/pathexec_run.c
@@ -1,5 +1,6 @@
 /* Public domain. */
 
+#include <unistd.h>
 #include "error.h"
 #include "stralloc.h"
 #include "str.h"
--- a/prot.c
+++ b/prot.c
@@ -1,12 +1,15 @@
 /* Public domain. */
 
+#include <unistd.h>
+#include <grp.h>
+
 #include "hasshsgr.h"
 #include "prot.h"
 
 int prot_gid(int gid)
 {
 #ifdef HASSHORTSETGROUPS
-  short x[2];
+  gid_t x[2];
   x[0] = gid; x[1] = 73; /* catch errors */
   if (setgroups(1,x) == -1) return -1;
 #else
--- a/seek_set.c
+++ b/seek_set.c
@@ -1,5 +1,6 @@
 /* Public domain. */
 
+#include <unistd.h>
 #include <sys/types.h>
 #include "seek.h"