[Click] element compilation error and solution
Eddie Kohler
kohler at CS.UCLA.EDU
Wed Sep 22 13:24:14 EDT 2004
Thanks for this! I've checked in a fix.
Eddie
On Sep 22, 2004, at 3:32 AM, Frederic Van Quickenborne wrote:
> Hi,
>
> when I was adapting the ExtEtherSwitch element (ethernet switch with
> VLANs, if anybody is interested, let me know) to work with the click
> 1.4.1 release, I encoutered the following error (using the Makefile
> written by Brecht Vermeulen to easily build kernel modules from your
> element source files):
>
> nike1:/home/fvquicke/extetherswitch# make
> c++ -Wp,-w -W -Wall -w -I. -I/usr/src/linux/include
> -I/work/click/source/click-1.4.1/include
> -I/work/click/source/click-1.4.1 -MD -DCLICK_LINUXMODULE
> -DCLICK_PACKAGE -DHAVE_IP6 -fno-exceptions -fno-rtti -fvtable-thunks
> -O2 -c extetherswitch.cc -o extetherswitch.ko
> In file included from /usr/src/linux/include/linux/skbuff.h:27,
> from
> /work/click/source/click-1.4.1/include/click/glue.hh:27,
> from
> /work/click/source/click-1.4.1/include/click/element.hh:4,
> from extetherswitch.hh:3,
> from extetherswitch.cc:19:
> /usr/src/linux/include/linux/highmem.h: In function `void
> copy_highpage(page *, page *)':
> /usr/src/linux/include/linux/highmem.h:128: ANSI C++ forbids implicit
> conversion from `void *' in assignment
> /usr/src/linux/include/linux/highmem.h:129: ANSI C++ forbids implicit
> conversion from `void *' in assignment
> make: *** [extetherswitch.ko] Error 1
> (on Linux kernel 2.4.26)
>
> Then I adapted the /usr/src/linux/include/linux/highmem.h file (at the
> end of the file):
>
> static inline void copy_highpage(struct page *to, struct page *from)
> {
> char *vfrom, *vto;
>
> // added (char *) in following line
> vfrom = (char *)kmap_atomic(from, KM_USER0);
> // added (char *) in following line
> vto = (char *)kmap_atomic(to, KM_USER1);
> copy_page(vto, vfrom);
> kunmap_atomic(vfrom, KM_USER0);
> kunmap_atomic(vto, KM_USER1);
> }
>
> Which solved my problem.
>
> Maybe it help others with the same problem.
>
> Many regards,
> Frederic.
>
>
>
> ==================================================================
> Frederic Van Quickenborne
> Department of Information Technology (INTEC)
> Ghent University - IMEC
> Sint-Pietersnieuwstraat 41, B-9000 Gent, Belgium
> tel.: +32 (0)9-264 9957; tel. secr.: +32 (0)9-264 9970
> fax: +32 (0)9-264 9960
> Frederic.VanQuickenborne at intec.ugent.be
> http://www.ibcn.intec.ugent.be
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list