linux/serial.h broken, uses __u32 without declaring/including it

Bug #302888 reported by Martin Pitt
4
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
In Progress
High
Andy Whitcroft

Bug Description

$ cat /tmp/test-serial.c
#include <linux/serial.h>
int main() { return 0; }

On intrepid it works fine:
$ gcc -c /tmp/test-serial.c
$ echo $?
0

but in jaunty the include file is broken:

$ gcc -c /tmp/test-serial.c
In file included from /tmp/test-serial.c:1:
/usr/include/linux/serial.h:164: error: expected specifier-qualifier-list before ‘__u32’

Revision history for this message
Martin Pitt (pitti) wrote :

This started with linux-libc-dev 2.6.28, 2.6.27 worked fine.

This breaks the build of hal and possibly other programs.

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → High
Revision history for this message
Martin Pitt (pitti) wrote :

Workaround is to #include <linux/types.h>, but this should be done by serial.h itself if it needs data types from it.

Changed in linux:
importance: High → Medium
Changed in linux:
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

This is indeed not a problem upstream:

  http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=include/linux/serial.h;hb=c26c56c0f40e200e61d1390629c806f6adaffbcc

upstream does include linux/types.h. Can the file please be merged with upstream?

Revision history for this message
Martin Pitt (pitti) wrote :

After hal this now struck cups as well.

Changed in linux:
importance: Medium → High
Tim Gardner (timg-tpi)
Changed in linux:
assignee: ubuntu-kernel-team → timg-tpi
status: Triaged → In Progress
Revision history for this message
Andy Whitcroft (apw) wrote :

@Martin Pitt -- actually this is a problem upstream. Although serial.h includes linux/types.h it only does so when included in the kernel (under __KERNEL__). I have also been looking at this under bug #303711. I have submitted a patch to mainline against that bug.

Revision history for this message
Andy Whitcroft (apw) wrote :

@rtg -- I have pushed up the patch I sumitted under bug #303711 to the kernel team mailing list for consideration.

Tim Gardner (timg-tpi)
Changed in linux:
assignee: timg-tpi → apw
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.