nixpkgs/pkgs/os-specific/linux/ndiswrapper/prefix.patch
Michael Raskin 9bb2afe778 Now ndiswrapper builds at least..
svn path=/nixpkgs/trunk/; revision=12101
2008-06-15 15:11:19 +00:00

66 lines
2.3 KiB
Diff

diff -r -u ndiswrapper-1.53/driver/loader.c ndiswrapper-1.53/driver/loader.c
--- ndiswrapper-1.53/driver/loader.c 2008-05-28 06:54:08.000000000 +0400
+++ ndiswrapper-1.53/driver/loader.c 2008-06-15 17:05:07.000000000 +0400
@@ -100,7 +100,7 @@
EXIT1(return NULL);
}
INIT_COMPLETION(loader_complete);
- ret = call_usermodehelper("/sbin/loadndisdriver", argv, env, 1);
+ ret = call_usermodehelper(USERMOD_HELPER, argv, env, 1);
if (ret) {
up(&loader_mutex);
ERROR("couldn't load driver %s; check system log "
@@ -262,7 +262,7 @@
EXIT1(return NULL);
}
INIT_COMPLETION(loader_complete);
- ret = call_usermodehelper("/sbin/loadndisdriver", argv, env, 1);
+ ret = call_usermodehelper(USERMOD_HELPER, argv, env, 1);
if (ret) {
up(&loader_mutex);
ERROR("couldn't load file %s/%s; check system log "
@@ -698,7 +698,7 @@
EXIT1(return NULL);
}
INIT_COMPLETION(loader_complete);
- ret = call_usermodehelper("/sbin/loadndisdriver", argv, env, 1);
+ ret = call_usermodehelper(USERMOD_HELPER, argv, env, 1);
if (ret) {
up(&loader_mutex);
TRACE1("couldn't load device %04x:%04x; check system "
diff -r -u ndiswrapper-1.53/driver/Makefile ndiswrapper-1.53/driver/Makefile
--- ndiswrapper-1.53/driver/Makefile 2008-05-28 06:54:08.000000000 +0400
+++ ndiswrapper-1.53/driver/Makefile 2008-06-15 17:03:31.000000000 +0400
@@ -95,6 +95,10 @@
EXTRA_CFLAGS += -DWRAP_PREEMPT
endif
+ifdef DIST_DESTDIR
+EXTRA_CFLAGS += -DPREFIX=\"$(DIST_DESTDIR)\"
+endif
+
OBJS = crt.o hal.o iw_ndis.o loader.o ndis.o ntoskernel.o ntoskernel_io.o \
pe_linker.o pnp.o proc.o rtl.o wrapmem.o wrapndis.o wrapper.o
diff -r -u ndiswrapper-1.53/driver/ndiswrapper.h ndiswrapper-1.53/driver/ndiswrapper.h
--- ndiswrapper-1.53/driver/ndiswrapper.h 2008-05-28 06:54:08.000000000 +0400
+++ ndiswrapper-1.53/driver/ndiswrapper.h 2008-06-15 17:06:37.000000000 +0400
@@ -19,8 +19,17 @@
#define DRIVER_VERSION "1.53"
#define UTILS_VERSION "1.9"
+#ifndef PREFIX
+#define PREFIX
+#endif
+
#define DRIVER_NAME "ndiswrapper"
-#define DRIVER_CONFIG_DIR "/etc/ndiswrapper"
+
+#ifndef DRIVER_CONFIG_DIR
+# define DRIVER_CONFIG_DIR PREFIX "/etc/ndiswrapper"
+#endif
+
+#define USERMOD_HELPER PREFIX "/sbin/loadndisdriver"
#define SSID_MAX_WPA_IE_LEN 40
#define NDIS_ESSID_MAX_SIZE 32