Compile error in hostap_hw.c? (0.0.4)

Pavel Roskin proski at gnu.org
Wed Jul 30 12:22:30 EDT 2003


On Wed, 30 Jul 2003, Mario Kuechler wrote:

> depmod: *** Unresolved symbols in /lib/modules/2.4.18/net/hostap_pci.o
> depmod:         yield
>
> If I understand hostap_hw.c right, this function has "something to do" with
> 2.2.x kernels?

Yes, sort of.  It's missing in those kernels.  It first appeared in Linux
2.4.19 as a preprocessor symbol and became a function since Linux 2.4.20.

Unfortunately, "ifdef" doesn't always do the right thing.  Sometimes the
knowledge about past versions needs to be used.

Please test this patch:

======================================
--- driver/modules/hostap_compat.h
+++ driver/modules/hostap_compat.h
@@ -69,10 +69,6 @@
 	INIT_LIST_HEAD(entry);
 }

-#ifndef yield
-#define yield() schedule()
-#endif
-
 /* end 2.2 compatibility */

 #else /* kernel < 2.4.0 */
@@ -135,6 +131,11 @@
 #endif /* kernel < 2.4.0 */


+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19))
+#define yield() schedule()
+#endif
+
+
 /* Interrupt handler backwards compatibility for Linux < 2.5.69 */
 #ifndef IRQ_NONE
 #define IRQ_NONE
======================================

If it works for you, it should be safe to apply.

-- 
Regards,
Pavel Roskin



More information about the HostAP mailing list