#255 Compile error against Kernel pre-2.6.38

open
nobody
None
5
2012-10-06
2011-02-05
No

CC [M]  /usr/src/packages/BUILD/ndiswrapper-1.56/obj/default/wrapndis.o
In file included from /usr/src/linux-2.6.38-rc3-3/include/linux/jhash.h:27:0,
                 from /usr/src/linux-2.6.38-rc3-3/include/net/inet_sock.h:23,
                 from /usr/src/linux-2.6.38-rc3-3/include/net/inet_connection_sock.h:23,
                 from /usr/src/linux-2.6.38-rc3-3/include/linux/tcp.h:211,
                 from /usr/src/packages/BUILD/ndiswrapper-1.56/obj/default/wrapndis.c:23:
/usr/src/linux-2.6.38-rc3-3/include/linux/unaligned/packed_struct.h:6:29: error: expected ')' before 'attribute'
/usr/src/linux-2.6.38-rc3-3/include/linux/unaligned/packed_struct.h:6:29: error: expected identifier or '(' before ')' token
/usr/src/linux-2.6.38-rc3-3/include/linux/unaligned/packed_struct.h:7:29: error: expected ')' before 'attribute'
/usr/src/linux-2.6.38-rc3-3/include/linux/unaligned/packed_struct.h:7:29: error: expected identifier or '(' before ')' token
/usr/src/linux-2.6.38-rc3-3/include/linux/unaligned/packed_struct.h:8:29: error: expected ')' before 'attribute'
/usr/src/linux-2.6.38-rc3-3/include/linux/unaligned/packed_struct.h:8:29: error: expected identifier or '(' before ')' token
make[3]: [/usr/src/packages/BUILD/ndiswrapper-1.56/obj/default/wrapndis.o] Error 1
make[2]: 
[module/usr/src/packages/BUILD/ndiswrapper-1.56/obj/default] Error 2
make[1]: [sub-make] Error 2
make: 
[all] Error 2
make: Leaving directory `/usr/src/linux-2.6.38-rc3-3-obj/x86_64/default'

(see: https://build.opensuse.org/package/live_build_log?arch=x86_64&package=ndiswrapper&project=home%3Ajobermayr&repository=openSUSE_11.3_X11)

Used sources:
https://build.opensuse.org/package/files?package=ndiswrapper&project=home%3Ajobermayr

Discussion

  • Phil Miller
    Phil Miller
    2011-02-21

    This can be fixed by adding followed simple patch:

    --- ndiswrapper-1.56.old/driver/wrapndis.c (revision 2728)
    +++ ndiswrapper-1.56/driver/wrapndis.c (revision 2729)
    @@ -13,16 +13,16 @@


    /

    +#include <linux inetdevice.h="">
    +#include <linux ip.h="">
    +#include <linux tcp.h="">
    +#include <linux udp.h="">
    +#include <linux in.h="">
    #include "ndis.h"
    #include "iw_ndis.h"
    #include "pnp.h"
    #include "loader.h"
    #include "wrapndis.h"
    -#include <linux inetdevice.h="">
    -#include <linux ip.h="">
    -#include <linux tcp.h="">
    -#include <linux udp.h="">
    -#include <linux in.h="">
    #include "wrapper.h"

    / Functions callable from the NDIS driver /

     
  • Thanks. Now I get this error (xen-only on 2.6.38):

    CC [M] /usr/src/packages/BUILD/ndiswrapper-1.56/obj/xen/crt.o
    In file included from /usr/src/packages/BUILD/ndiswrapper-1.56/obj/xen/ntoskernel.h:67:0,
    from /usr/src/packages/BUILD/ndiswrapper-1.56/obj/xen/crt.c:16:
    /usr/src/linux-2.6.38-rc5-11/arch/x86/include/mach-xen/asm/dma-mapping.h:11:26: error: redefinition of 'phys_to_dma'
    /usr/src/linux-2.6.38-rc5-11/arch/x86/include/mach-xen/asm/dma-mapping.h:11:26: note: previous definition of 'phys_to_dma' was here
    /usr/src/linux-2.6.38-rc5-11/arch/x86/include/mach-xen/asm/dma-mapping.h:16:27: error: redefinition of 'dma_to_phys'
    /usr/src/linux-2.6.38-rc5-11/arch/x86/include/mach-xen/asm/dma-mapping.h:16:27: note: previous definition of 'dma_to_phys' was here
    make[3]: [/usr/src/packages/BUILD/ndiswrapper-1.56/obj/xen/crt.o] Error 1
    make[2]:
    [module/usr/src/packages/BUILD/ndiswrapper-1.56/obj/xen] Error 2

    (see: https://build.opensuse.org/package/live_build_log?arch=x86_64&package=ndiswrapper&project=home%3Ajobermayr&repository=openSUSE_11.3)