archive: dragora-tools/dragora-keymap: minor changes
[dragora.git] / patches / socklog / socklog-headers
blobb7c10e3da6069277d3997405be64184fdb63cee1
1 add missing headers for misc funcs and types
3 --- a/chkshsgr.c
4 +++ b/chkshsgr.c
5 @@ -1,10 +1,11 @@
6  /* Public domain. */
7  
8  #include <unistd.h>
9 +#include <grp.h>
11  int main()
12  {
13 -  short x[4];
14 +  gid_t x[4];
16    x[0] = x[1] = 0;
17    if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1);
18 --- a/pathexec_run.c
19 +++ b/pathexec_run.c
20 @@ -1,5 +1,6 @@
21  /* Public domain. */
23 +#include <unistd.h>
24  #include "error.h"
25  #include "stralloc.h"
26  #include "str.h"
27 --- a/prot.c
28 +++ b/prot.c
29 @@ -1,12 +1,15 @@
30  /* Public domain. */
32 +#include <unistd.h>
33 +#include <grp.h>
35  #include "hasshsgr.h"
36  #include "prot.h"
38  int prot_gid(int gid)
39  {
40  #ifdef HASSHORTSETGROUPS
41 -  short x[2];
42 +  gid_t x[2];
43    x[0] = gid; x[1] = 73; /* catch errors */
44    if (setgroups(1,x) == -1) return -1;
45  #else
46 --- a/seek_set.c
47 +++ b/seek_set.c
48 @@ -1,5 +1,6 @@
49  /* Public domain. */
51 +#include <unistd.h>
52  #include <sys/types.h>
53  #include "seek.h"