Bug 24516 - Compile error with gcc 4.2
Summary: Compile error with gcc 4.2
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/radeonhd (show other bugs)
Version: 7.3 (2007.09)
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Luc Verhaegen
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-14 02:17 UTC by Floréal Toumikian
Modified: 2009-10-14 08:04 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Floréal Toumikian 2009-10-14 02:17:40 UTC
Greetings,
I get compile error when running make.
Here is my uname -r:
2.6.24-24-generic

My gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)

And the error running the make command:
rhd_acpi.c: Dans la fonction «rhdDoBacklight» :
rhd_acpi.c:66: attention : assignment from incompatible pointer type
rhd_acpi.c:70: erreur: déréférencement d'un pointeur de type incomplet
rhd_acpi.c:81: erreur: déréférencement d'un pointeur de type incomplet
make[3]: *** [radeonhd_drv_la-rhd_acpi.lo] Erreur 1
make[2]: *** [all] Erreur 2
make[1]: *** [all-recursive] Erreur 1
make: *** [all] Erreur 2

I did not tried with other gcc version yet, i'll try out tonight.
Comment 1 Matthias Hopf 2009-10-14 08:04:10 UTC
Should be fixed in latest git.

From 34d975dbbeca76748e08a54ab724f176c7e1cf8e Mon Sep 17 00:00:00 2001
From: Matthias Hopf <mhopf@suse.de>
Date: Mon, 12 Oct 2009 14:52:01 +0200
Subject: [PATCH] Fix compilation with xf86_ansic.h

---
 src/rhd_acpi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/rhd_acpi.c b/src/rhd_acpi.c
index 3831925..78751e5 100644
--- a/src/rhd_acpi.c
+++ b/src/rhd_acpi.c
@@ -28,6 +28,7 @@

 #if HAVE_XF86_ANSIC_H
 # include "xf86_ansic.h"
+# define dirent _xf86dirent
 #else
 # include <unistd.h>
 # include <sys/types.h>
--
1.6.0.2


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.