Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 555256 - x11-drivers/xf86-video-virtualbox-5.0.0 needs patches for gcc-5.2.0
Summary: x11-drivers/xf86-video-virtualbox-5.0.0 needs patches for gcc-5.2.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-18 09:59 UTC by Helmut Jarausch
Modified: 2015-11-04 12:48 UTC (History)
1 user (show)

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


Attachments
patch for gcc-5.2.0 (virtualbox-5.0.0-all-configure.patch,604 bytes, patch)
2015-07-18 09:59 UTC, Helmut Jarausch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2015-07-18 09:59:18 UTC
Created attachment 407068 [details, diff]
patch for gcc-5.2.0

Similarly to https://bugs.gentoo.org/show_bug.cgi?id=554952
xf86-video-virtualbox-5.0.0 needs a patch for gcc-5.2.0 since the restriction
to gcc version < 5.2 is not necessary.

But there is an additional problem.
It includes the current kernel headers directly.

Unfortunately these contain the following declaration

char *strreplace(char *s, char old, char new);

in file  include/linux/string.h

But "new" is a keyword which is enforced with gcc-5.2.0 (at least)
Therefore this include produces a syntax error.

Since parameter names are redundant in a function's declaration (not its definition, of course), this declaration can be replaced by

char *strreplace(char *s, char old, char NEW);

Therefore one needs to patch the kernel headers as follows:

--- include/linux/string.h	2015-06-27 16:44:41.218737227 +0200
+++ /usr/src/linux-4.2-rc2/include/linux/string.h	2015-07-15 10:15:28.603810671 +0200
@@ -111,7 +111,7 @@
 extern void * memchr(const void *,int,__kernel_size_t);
 #endif
 void *memchr_inv(const void *s, int c, size_t n);
-char *strreplace(char *s, char old, char new);
+char *strreplace(char *s, char old, char NEW);
 
 extern void kfree_const(const void *x);
 

Note that this patch has no effect besides disabling the syntax error described above.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-11-04 12:48:55 UTC
Should be fixed with latest virtualbox-5 releases.