--- ndiswrapper-1.59.orig/driver/crt.c	2013-11-28 21:42:35.000000000 +0200
+++ ndiswrapper-1.59/driver/crt.c	2014-05-10 19:26:47.063312726 +0300
@@ -467,7 +467,7 @@
 noregparm void WIN_FUNC(_win_srand,1)
 	(UINT seed)
 {
-	net_srandom(seed);
+	prandom_seed((__force u32)(seed));
 }
 
 noregparm int WIN_FUNC(rand,0)
--- ndiswrapper-1.59.orig/driver/ntoskernel.h	2013-11-28 21:42:36.000000000 +0200
+++ ndiswrapper-1.59/driver/ntoskernel.h	2014-05-10 19:28:42.113311836 +0300
@@ -347,7 +347,7 @@
 #define netdev_notifier_info_to_dev(x) ((struct net_device *)(x))
 #endif
 
-#ifdef INIT_COMPLETION
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)
 static inline void reinit_completion(struct completion *x)
 {
 	INIT_COMPLETION(*x);
@@ -797,9 +797,8 @@
 #define nt_spin_unlock_irqrestore(lock, flags)				\
 do {									\
 	nt_spin_unlock(lock);						\
-	preempt_enable_no_resched();					\
+	preempt_enable();					\
 	local_irq_restore(flags);					\
-	preempt_check_resched();					\
 } while (0)
 
 static inline ULONG SPAN_PAGES(void *ptr, SIZE_T length)
