From nobody@FreeBSD.org  Mon Jun 27 16:25:37 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 516DF1065674
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 27 Jun 2011 16:25:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 41C048FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 27 Jun 2011 16:25:37 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p5RGPbbJ079066
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 27 Jun 2011 16:25:37 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p5RGPboC079065;
	Mon, 27 Jun 2011 16:25:37 GMT
	(envelope-from nobody)
Message-Id: <201106271625.p5RGPboC079065@red.freebsd.org>
Date: Mon, 27 Jun 2011 16:25:37 GMT
From: Robert Millan <rmh@debian.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: missing #includes in <cam/cam.h>
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         158351
>Category:       kern
>Synopsis:       [cam] [patch] missing #includes in <cam/cam.h>
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 27 16:30:12 UTC 2011
>Closed-Date:    
>Last-Modified:  Mon Jun 27 22:12:14 UTC 2011
>Originator:     Robert Millan
>Release:        Debian GNU/kFreeBSD "sid"
>Organization:
>Environment:
>Description:
dimoni# cat > test.c
#include <cam/cam.h>
^D
dimoni# gcc -c test.c -o /dev/null 
In file included from test.c:1:
/usr/include/cam/cam.h:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'path_id_t'
/usr/include/cam/cam.h:41: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'target_id_t'
/usr/include/cam/cam.h:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'lun_id_t'
/usr/include/cam/cam.h:78: error: expected specifier-qualifier-list before 'u_int32_t'
/usr/include/cam/cam.h:230: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cam_quirkmatch'
/usr/include/cam/cam.h:233: error: expected ')' before '*' token
/usr/include/cam/cam.h:235: error: expected ';', ',' or ')' before '*' token
/usr/include/cam/cam.h:252: error: expected declaration specifiers or '...' before 'FILE'

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- /usr/include/cam/cam.h	2011-02-19 23:06:57.000000000 +0100
+++ cam.h	2011-06-27 18:22:16.885773750 +0200
@@ -33,8 +33,11 @@
 
 #ifdef _KERNEL
 #include <opt_cam.h>
+#else
+#include <stdio.h>	/* FILE */
 #endif
 
+#include <sys/types.h>
 #include <sys/cdefs.h>
 
 typedef u_int path_id_t;


>Release-Note:
>Audit-Trail:
>Unformatted:
