summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kmod
diff options
context:
space:
mode:
authorMichael Roitzsch <reactorcontrol@icloud.com>2020-12-28 20:00:37 +0100
committerMichael Roitzsch <reactorcontrol@icloud.com>2020-12-28 20:02:45 +0100
commit4224476df6643dd50982a393534f1c3f22d8a1c0 (patch)
treefd7d9cfb21f1b1ca7763cfa536c3f830f0e88728 /pkgs/os-specific/linux/kmod
parentdcbe3b47796b50e0f333680248b804c500ee7f04 (diff)
downloadnixpkgs-4224476df6643dd50982a393534f1c3f22d8a1c0.tar
nixpkgs-4224476df6643dd50982a393534f1c3f22d8a1c0.tar.gz
nixpkgs-4224476df6643dd50982a393534f1c3f22d8a1c0.tar.bz2
nixpkgs-4224476df6643dd50982a393534f1c3f22d8a1c0.tar.lz
nixpkgs-4224476df6643dd50982a393534f1c3f22d8a1c0.tar.xz
nixpkgs-4224476df6643dd50982a393534f1c3f22d8a1c0.tar.zst
nixpkgs-4224476df6643dd50982a393534f1c3f22d8a1c0.zip
kmod: fix kmod tools crash on darwin
include the proper header for basename(), otherwise the returned
pointer is truncated to 32 bit because an int return type is assumed
Diffstat (limited to 'pkgs/os-specific/linux/kmod')
-rw-r--r--pkgs/os-specific/linux/kmod/darwin.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kmod/darwin.patch b/pkgs/os-specific/linux/kmod/darwin.patch
index 69dbf479f9f..e112e691525 100644
--- a/pkgs/os-specific/linux/kmod/darwin.patch
+++ b/pkgs/os-specific/linux/kmod/darwin.patch
@@ -121,3 +121,15 @@ index fd2028d..ecb0141 100644
  	if (!cwd)
  		return NULL;
  
+--- a/shared/util.h	2018-01-31 18:10:59.000000000 +0100
++++ b/shared/util.h	2020-12-28 19:48:21.000000000 +0100
+@@ -7,6 +7,9 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#ifdef __APPLE__
++#include <libgen.h>
++#endif
+ 
+ #include <shared/macro.h>
+