[patch] irda compile problem

From: François romieu (romieu@ensta.fr)
Date: Tue Apr 04 2000 - 06:08:39 EST


The Tue, Apr 04, 2000 at 03:31:24AM +0100, Ganesh Sittampalam wrote :
[...]
> make -C irda modules
> make[3]: Entering directory
> `/mnt/hdc2/usr/src/kernels/2.3.99-pre4-3-ganesh/net/irda'
> gcc -D__KERNEL__ -I/mnt/hdc2/usr/src/kernels/2.3.99-pre4-3-ganesh/include
> -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing
> -pipe -march=i586 -DMODULE -DMODVERSIONS -include
> /mnt/hdc2/usr/src/kernels/2.3.99-pre4-3-ganesh/include/linux/modversions.h
> -c -o af_irda.o af_irda.c
> af_irda.c: In function `irda_data_wait':
> af_irda.c:1218: `SO_WAITDATA' undeclared (first use in this function)
> af_irda.c:1218: (Each undeclared identifier is reported only once
> af_irda.c:1218: for each function it appears in.)
> af_irda.c: In function `irda_recvmsg_stream':
> af_irda.c:1244: `SO_ACCEPTCON' undeclared (first use in this function)
> make[3]: *** [af_irda.o] Error 1
> make[3]: Leaving directory
> `/mnt/hdc2/usr/src/kernels/2.3.99-pre4-3-ganesh/net/irda'
> make[2]: *** [_modsubdir_irda] Error 2
> make[2]: Leaving directory
> `/mnt/hdc2/usr/src/kernels/2.3.99-pre4-3-ganesh/net'
> make[1]: *** [_mod_net] Error 2
> make[1]: Leaving directory
> `/mnt/hdc2/usr/src/kernels/2.3.99-pre4-3-ganesh'
> make: *** [stamp-build] Error 2

The following compiles :

--- linux-2.3.99pre4-3/net/irda/af_irda.c.orig Tue Apr 4 10:18:02 2000
+++ linux-2.3.99pre4-3/net/irda/af_irda.c Tue Apr 4 10:35:29 2000
@@ -1215,9 +1215,9 @@
 static void irda_data_wait(struct sock *sk)
 {
        if (!skb_peek(&sk->receive_queue)) {
- sk->socket->flags |= SO_WAITDATA;
+ set_bit(SOCK_ASYNC_WAITDATA, &sk->socket->flags );
                interruptible_sleep_on(sk->sleep);
- sk->socket->flags &= ~SO_WAITDATA;
+ clear_bit( SOCK_ASYNC_WAITDATA, &sk->socket->flags );
        }
 }
 
@@ -1241,7 +1241,7 @@
        self = sk->protinfo.irda;
        ASSERT(self != NULL, return -1;);
 
- if (sock->flags & SO_ACCEPTCON)
+ if (sock->flags & __SO_ACCEPTCON)
                return(-EINVAL);
 
        if (flags & MSG_OOB)

Btw, I don't understand why there is a difference of syntax between
#define __SO_ACCEPTCON (1<<16) /* performed a listen */
and
#define SOCK_ASYNC_NOSPACE 0
#define SOCK_ASYNC_WAITDATA 1
#define SOCK_NOSPACE 2
An explanation would be welcome.

-- 
Ueimor

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:11 EST