Bug 1138759 - bad include in vmwgfx_drm.h
Summary: bad include in vmwgfx_drm.h
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-05 15:03 UTC by D. Marlin
Modified: 2014-09-17 14:24 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-17 14:24:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description D. Marlin 2014-09-05 15:03:12 UTC
Description of problem:
The 3.15 kernel has changed the /usr/include/drm/vmwgfx_drm.h file to add a line
  #include <drm.h>

Compilation may fail on this file because the compiler cannot find drm.h since it is in /usr/include/drm, which is not in the default include path for gcc.

Every other kernel header file that reference drm.h includes <drm/drm.h>.  Should vmwgfx_drm.h be updated to include <drm/drm.h> instead of <drm.h>

[root@localhost drm]# grep 'include.*drm.h' /usr/include/drm/*
/usr/include/drm/drm_sarea.h:#include <drm/drm.h>
/usr/include/drm/exynos_drm.h:#include <drm/drm.h>
/usr/include/drm/i915_drm.h:#include <drm/drm.h>
/usr/include/drm/mga_drm.h:#include <drm/drm.h>
/usr/include/drm/msm_drm.h:#include <drm/drm.h>
/usr/include/drm/qxl_drm.h:#include "drm/drm.h"
/usr/include/drm/radeon_drm.h:#include <drm/drm.h>
/usr/include/drm/tegra_drm.h:#include <drm/drm.h>
/usr/include/drm/via_drm.h:#include <drm/drm.h>
/usr/include/drm/vmwgfx_drm.h:#include <drm.h>       <--- the odd one


Version-Release number of selected component (if applicable):
kernel-headers-3.15.10-201.fc20.x86_64 and newer

How reproducible:
consistently

Steps to Reproduce:
1. cat >test-drm_vmwgfx_drm.h.c <<EOF
#include <stddef.h>
#include <stdint.h>
#include <linux/types.h>
#include <drm/vmwgfx_drm.h>
EOF

2. gcc -c -O0 -Wall -I/usr/include/ test-drm_vmwgfx_drm.h.c


Actual results:
In file included from test-drm_vmwgfx_drm.h.c:4:0:
/usr/include/drm/vmwgfx_drm.h:31:17: fatal error: drm.h: No such file or directory

Expected results:
successful compile


Additional info:
This change was introduced by commit 1d7a5cbf8f74e
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1d7a5cbf8f74e

Originally reported by jbastian.

Comment 1 Josh Boyer 2014-09-05 17:20:15 UTC
Patch sent upstream.

Comment 2 Josh Boyer 2014-09-17 14:24:32 UTC
Fixed in today's rawhide.  Patch is queued for 3.18 upstream.


Note You need to log in before you can comment on or make changes to this bug.