Hi Eric,

Thank you very much for your report.

On Thursday 26 February 2009 08:17:47 Eric Shubert wrote:
> I've attempted to compile subject, ran into a few snags, and have a few
> solutions.
>
> vmxnet.c build failed with:
> make[3]: Entering directory
> `/usr/src/open-vm-tools-2009.02.18-148847/modules/linux/vmxnet'
> In file included from /lib/modules/2.4.36/build/include/asm/dma.h:14,
>                   from vmxnet.c:34:
> /lib/modules/2.4.36/build/include/linux/delay.h:62: error: parse error
> before "const"
> make[3]: *** [vmxnet.o] Error 1
>
> I couldn't see what the problem with linux/delay.h exactly was, but it
> doesn't appear to be necessary. I tried removing
> #include <asm/dma.h>
> from vmxnet.c, and the only complaint from the compiler was the lack of
> the udelay function, which is defined in <asm/delay.h>. It appears that
> asm/dma.h was including linux/delay.h, which in turn included
> asm/delay.h, which contained the udelay definition. I replaced
> <asm/dma.h> with <asm/delay.h>, and vmxnet.c compiled clean. Of course
> whether it actually works or not is another question.
>

This should indeed work.

> The next error was with vmhgfs. Makefile.normal had specified
> hgfsEscapeLinux.o, while the program was really hgfsEscape.o (the
> "Linux" part had apparently been dropped along the line). I modified
> Makefile.normal, specifying hgfsEscape.o, and it compiled clean. Can
> someone verify if this is correct?
>

Yes, that is correct. There should already be hgfsEscape.o in the list of 
dependencies so you can just remove hgfsEscapeLinux.o

> With vmsock, I get this:
> make[4]: Entering directory
> `/usr/src/open-vm-tools-2009.02.18-148847p/modules/linux/vsock/driver-2.4.3
>6' Compiling .././linux/af_vsock.c
> ../linux/af_vsock.c: In function `VSockVmciStreamConnect':
> ../linux/af_vsock.c:3466: warning: implicit declaration of function
> `DEFINE_WAIT'
> ../linux/af_vsock.c:3466: error: `wait' undeclared (first use in this
> function)
> ../linux/af_vsock.c:3466: error: (Each undeclared identifier is reported
> only once
> ../linux/af_vsock.c:3466: error: for each function it appears in.)
> ../linux/af_vsock.c:3542: warning: implicit declaration of function
> `prepare_to_wait'
> ../linux/af_vsock.c:3577: warning: implicit declaration of function
> `finish_wait'
> ../linux/af_vsock.c: In function `VSockVmciAccept':
> ../linux/af_vsock.c:3615: error: `wait' undeclared (first use in this
> function)
> ../linux/af_vsock.c: In function `VSockVmciStreamSendmsg':
> ../linux/af_vsock.c:4360: error: `wait' undeclared (first use in this
> function)
> ../linux/af_vsock.c: In function `VSockVmciStreamRecvmsg':
> ../linux/af_vsock.c:4714: error: `wait' undeclared (first use in this
> function)
> make[4]: *** [af_vsock.o] Error 1
> make[4]: Leaving directory
> `/usr/src/open-vm-tools-2009.02.18-148847p/modules/linux/vsock/driver-2.4.3
>6'
>
> Can someone explain what might be the problem here? I don't expect
> vmsock to be useful in the IPCop distro, but I'm wondering what the
> problem is, as it should build with this kernel.

Could you please try the patch below? You will need to apply it to all copies 
of compat_wait.h in the tree. Thanks!

-- 
Dmitry

--- compat_wait.h.orig
+++ compat_wait.h
@@ -179,10 +179,16 @@ do {                                                      
                \
 
 /*
  * DEFINE_WAIT() and friends were added in 2.5.39 and backported to 2.4.28.
+ *
+ * Unfortunately it is not true. While some distros may have done it the
+ * change has never made it into vanilla 2.4 kernel. Instead of testing
+ * particular kernel versions let's just test for presence of DEFINE_WAIT
+ * when figuring out whether we need to provide replacement implementation
+ * or simply alias existing one.
  */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 28) || \
-   (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0) && \
-    LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 39))
+
+#ifndef DEFINE_WAIT
+
 # define COMPAT_DEFINE_WAIT(_wait)                              \
    DECLARE_WAITQUEUE(_wait, current)
 # define compat_init_prepare_to_wait(_sleep, _wait, _state)     \
@@ -197,7 +203,9 @@ do {                                                        
                \
       __set_current_state(_state);                              \
       remove_wait_queue(_sleep, _wait);                         \
    } while (0)
+
 #else
+
 # define COMPAT_DEFINE_WAIT(_wait)                              \
    DEFINE_WAIT(_wait)
 # define compat_init_prepare_to_wait(_sleep, _wait, _state)     \
@@ -206,6 +214,7 @@ do {                                                        
                \
    prepare_to_wait(_sleep, _wait, _state)
 # define compat_finish_wait(_sleep, _wait, _state)              \
    finish_wait(_sleep, _wait)
-#endif
+
+#endif /* #ifndef DEFINE_WAIT */
 
 #endif /* __COMPAT_WAIT_H__ */


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
open-vm-tools-devel mailing list
open-vm-tools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-vm-tools-devel

Reply via email to