Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 582566

Summary: x11-drivers/xf86-video-virtualbox with kernel 4.4.6: /usr/src/linux-4.4.6-gentoo/include/linux/string.h line 117, char *strreplace(char *s, char old, char new);
Product: Gentoo Linux Reporter: Elmar Haag <linux>
Component: [OLD] Core systemAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED OBSOLETE    
Severity: blocker CC: bkohler, marci_r
Priority: Normal Keywords: STABLE
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Elmar Haag 2016-05-09 12:29:33 UTC
Kernel 4.4.6 and probable newer versions.
x11-drivers/xf86-video-virtualbox does not compile.

CAUSE:
/usr/src/linux-4.4.6-gentoo/include/linux/string.h line 117:
'char *strreplace(char *s, char old, char new);' causes compile failure.
"new" is a C++ keyword.

SOLUTION:
Changing to 'char *strreplace(char *s, char *, char *);' fixes the problem.
Comment 1 Alexey Min 2016-05-11 22:04:00 UTC
same as https://bugs.gentoo.org/show_bug.cgi?id=582132 I guess
Comment 2 Julien Tachoires 2016-05-27 06:18:02 UTC
(In reply to Elmar Haag from comment #0)
> Kernel 4.4.6 and probable newer versions.
> x11-drivers/xf86-video-virtualbox does not compile.
> 
> CAUSE:
> /usr/src/linux-4.4.6-gentoo/include/linux/string.h line 117:
> 'char *strreplace(char *s, char old, char new);' causes compile failure.
> "new" is a C++ keyword.
> 
> SOLUTION:
> Changing to 'char *strreplace(char *s, char *, char *);' fixes the problem.

Thank you.
Comment 3 Sophie Hamilton 2016-08-19 15:05:57 UTC
I just came across this issue too, but the proposed workaround doesn't look correct (it might happen to work if the function isn't used, but anything that used that function would fail at compile-time). The new function prototype should be:

> char *strreplace(char *s, char, char);

The package compiles fine with this change and seems to work fine, too.
Comment 4 Ben Kohler gentoo-dev 2017-08-31 19:29:12 UTC
Please reopen this bug if this is still a problem on current versions