summary refs log tree commit diff
path: root/pkgs/tools/system/socklog
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2017-09-13 18:21:31 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2017-09-13 18:27:15 +0200
commitaff74b6af7140d743dfeeb5e98dd024daf09e531 (patch)
tree690105c7eddc136a90772570ce5399e24cf9bcaf /pkgs/tools/system/socklog
parent705f47f50e40dc37d60fe2affaac89c15126b4bd (diff)
downloadnixpkgs-aff74b6af7140d743dfeeb5e98dd024daf09e531.tar
nixpkgs-aff74b6af7140d743dfeeb5e98dd024daf09e531.tar.gz
nixpkgs-aff74b6af7140d743dfeeb5e98dd024daf09e531.tar.bz2
nixpkgs-aff74b6af7140d743dfeeb5e98dd024daf09e531.tar.lz
nixpkgs-aff74b6af7140d743dfeeb5e98dd024daf09e531.tar.xz
nixpkgs-aff74b6af7140d743dfeeb5e98dd024daf09e531.tar.zst
nixpkgs-aff74b6af7140d743dfeeb5e98dd024daf09e531.zip
socklog: fixup implicit function declarations
Diffstat (limited to 'pkgs/tools/system/socklog')
-rw-r--r--pkgs/tools/system/socklog/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/tools/system/socklog/default.nix b/pkgs/tools/system/socklog/default.nix
index 78898fa1099..15a18a453f0 100644
--- a/pkgs/tools/system/socklog/default.nix
+++ b/pkgs/tools/system/socklog/default.nix
@@ -16,7 +16,13 @@ stdenv.mkDerivation rec {
   outputs = [ "out" "man" "doc" ];
 
   postPatch = ''
+    # Fails to run as user without supplementary groups
     echo "int main() { return 0; }" >src/chkshsgr.c
+
+    # Fixup implicit function declarations
+    sed -i src/pathexec_run.c -e '1i#include <unistd.h>'
+    sed -i src/prot.c -e '1i#include <unistd.h>' -e '2i#include <grp.h>'
+    sed -i src/seek_set.c -e '1i#include <unistd.h>'
   '';
 
   configurePhase = ''