Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 136332 - bad header 2.6.16-gentoo-r7 /usr/src/linux/include/linux/usb.h
Summary: bad header 2.6.16-gentoo-r7 /usr/src/linux/include/linux/usb.h
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-10 16:04 UTC by Frederic Blain
Modified: 2006-06-10 17:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Blain 2006-06-10 16:04:15 UTC
################################
## DESCRIPTION #################


linux-2.6.16-gentoo-r7: Linux kernel header include/linux/usb.h does not match a standard 2.6 usb.h header. As a consequence, some applications can not compile.

example :

from linux headers 2.6.11 (usb.h) :

struct usb_driver {
	struct module *owner;
	const char *name;
	int (*probe) (struct usb_interface *intf,
		      const struct usb_device_id *id);
	void (*disconnect) (struct usb_interface *intf);
	int (*ioctl) (struct usb_interface *intf, unsigned int code, void *buf);
	int (*suspend) (struct usb_interface *intf, u32 state);
	int (*resume) (struct usb_interface *intf);
	const struct usb_device_id *id_table;
	struct device_driver driver;
};


from gentoo headers 2.6.16-gentoo-r7 (usb.h) :


struct usb_driver {
	const char *name;
	int (*probe) (struct usb_interface *intf,
		      const struct usb_device_id *id);
	void (*disconnect) (struct usb_interface *intf);
	int (*ioctl) (struct usb_interface *intf, unsigned int code,
			void *buf);
	int (*suspend) (struct usb_interface *intf, pm_message_t message);
	int (*resume) (struct usb_interface *intf);
	const struct usb_device_id *id_table;
	struct usb_dynids dynids;
	struct device_driver driver;
	unsigned int no_dynamic_id:1;
};

The field "owner" is missing in the gentoo header and applications using
this structure can not compile.

Example: Zaptel

In the file wcusb.c from the zaptel application :

static struct usb_driver wc_usb_driver =
{
#ifdef LINUX26
	owner: THIS_MODULE,
#else	
	fops: NULL,
	minor: 0,
#endif	
	name: "wcusb",
	probe: wc_usb_probe,
	disconnect: wc_usb_disconnect,
	id_table: wc_dev_ids,
};

During the compilation, the following flags are used :
-I/usr/src/linux/include -DLINUX26
which is normal.

However, zaptel will fail to compile if the current kernel is a gentoo kernel since the usb.h header is not up to date.



################################
## INFORMATION #################

Thread concerning the zaptel issue :
http://forums.gentoo.org/viewtopic-t-458461.html


emerge --info:
Gentoo Base System version 1.6.14
Portage 2.0.54-r2 (default-linux/x86/no-nptl, gcc-3.4.5, glibc-2.3.6-r3, 2.6.16-gentoo-r7 i586)
=================================================================
System uname: 2.6.16-gentoo-r7 i586 Pentium MMX
dev-lang/python:     2.4.2
dev-python/pycrypto: [Not Present]
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i386-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i386-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.club-internet.fr/pub/mirrors/gentoo http://ftp.heanet.ie/pub/gentoo/ ftp://ftp.heanet.ie/pub/gentoo/ "
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aac aalib acl alsa apache2 apm arts audiofile avi berkdb bitmap-fonts bzip2 cdparanoia cdr clamav cli crypt cups directfb doc dri dvd eds emacs emboss encode expat fbcon ffmpeg foomaticdb fortran ftp gd gdbm gif gnome gnutils gpm gstream gstreamer gtk gtk2 imlib ipv6 isdnlog javascript jpeg kde lcms ldap libg++ libwww mad mbox mikmod mng motif mp3 mpeg msn mysql ncurses nls ogg opengl oss pam pcre pdflib perl php png posix pppd python qt quicktime readline reflection remote samba sdl server session slang spell spl ssl stats syslog tcpd tiff truetype truetype-fonts type1-fonts udev vcd vorbis xml xml2 xmms xorg xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS, PORTDIR_OVERLAY
Comment 1 Frederic Blain 2006-06-10 17:42:14 UTC
This is not a bug but a normal behaviour.
Linux header usb.h has changed between 2.6.15 and 2.6.16 and the field owner has been removed.


Concerning the zaptel issue, code has been update in zaptel.1.2.