ndiswrapper in core
This commit is contained in:
@@ -20,8 +20,13 @@ def build():
|
||||
autotools.make("-C utils")
|
||||
|
||||
def install():
|
||||
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
|
||||
|
||||
pisitools.insinto("/lib/modules/%s/extra" % KDIR, "*/*.ko")
|
||||
pisitools.dosbin("utils/ndiswrapper*", "/usr/sbin")
|
||||
pisitools.dosbin("utils/loadndisdriver", "/sbin")
|
||||
|
||||
# add man
|
||||
pisitools.doman("*.8")
|
||||
|
||||
pisitools.dodir("/etc/ndiswrapper")
|
||||
|
||||
pisitools.dodoc("README", "AUTHORS", "ChangeLog")
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From: Julian Andres Klode <jak@debian.org>
|
||||
Date: Tue, 12 May 2015 17:11:11 +0200
|
||||
Subject: Support kernel 4.0
|
||||
|
||||
---
|
||||
driver/ndis.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/driver/ndis.c b/driver/ndis.c
|
||||
index 9ace34b..fafd2e7 100644
|
||||
--- a/driver/ndis.c
|
||||
+++ b/driver/ndis.c
|
||||
@@ -25,6 +25,10 @@
|
||||
#define MAX_ALLOCATED_NDIS_PACKETS TX_RING_SIZE
|
||||
#define MAX_ALLOCATED_NDIS_BUFFERS TX_RING_SIZE
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
|
||||
+#define strncasecmp strnicmp
|
||||
+#endif
|
||||
+
|
||||
static struct work_struct ndis_work;
|
||||
static struct nt_list ndis_work_list;
|
||||
static spinlock_t ndis_work_list_lock;
|
||||
@@ -438,7 +442,7 @@ static int read_setting(struct nt_list *setting_list, char *keyname, int length,
|
||||
struct wrap_device_setting *setting;
|
||||
mutex_lock(&loader_mutex);
|
||||
nt_list_for_each_entry(setting, setting_list, list) {
|
||||
- if (strnicmp(keyname, setting->name, length) == 0) {
|
||||
+ if (strncasecmp(keyname, setting->name, length) == 0) {
|
||||
TRACE2("setting %s='%s'", keyname, setting->value);
|
||||
mutex_unlock(&loader_mutex);
|
||||
*param = ndis_encode_setting(setting, type);
|
||||
@@ -502,7 +506,7 @@ wstdcall void WIN_FUNC(NdisWriteConfiguration,4)
|
||||
|
||||
mutex_lock(&loader_mutex);
|
||||
nt_list_for_each_entry(setting, &nmb->wnd->wd->settings, list) {
|
||||
- if (strnicmp(keyname, setting->name, ansi.length) == 0) {
|
||||
+ if (strncasecmp(keyname, setting->name, ansi.length) == 0) {
|
||||
mutex_unlock(&loader_mutex);
|
||||
if (ndis_decode_setting(setting, param))
|
||||
*status = NDIS_STATUS_FAILURE;
|
||||
@@ -17,6 +17,9 @@
|
||||
<BuildDependencies>
|
||||
<Dependency version="4.1.5">kernel-module-headers</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch>support_kernel-4.0.patch</Patch>
|
||||
</Patches>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile target="ndiswrapper-1.59.patch">ndiswrapper-1.59.patch</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
|
||||
Reference in New Issue
Block a user