Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 582566 - 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);
Summary: x11-drivers/xf86-video-virtualbox with kernel 4.4.6: /usr/src/linux-4.4.6-gen...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal blocker
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords: STABLE
Depends on:
Blocks:
 
Reported: 2016-05-09 12:29 UTC by Elmar Haag
Modified: 2017-08-31 19:29 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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