socklog-headers 925 B

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