[vbox-dev] 4.2-rc kernels and strreplace(s, old, new) causing Virtualbox build issues
Alessandro Suardi
alessandro.suardi at gmail.com
Tue Aug 4 22:18:34 GMT 2015
Hi all,
while attempting to reproduce the build issues with manual.pdf as per
https://forums.virtualbox.org/viewtopic.php?f=10&t=68925
I tried my luck with today's Virtualbox trunk under 4.2-rc5... and well,
no luck with my manual.pdf issue - if any kind soul could give ideas
on where to start debugging, that'd be really golden.
However, back on topic - this testing uncovers a different build issue,
that is, strreplace in newer kernels breaks Virtualbox build because
of its third argument naming ("new") in string.h, and this choice isn't
welcomed by G++ when parsing the kernel includes...
I'm attaching the kernel-side bandaid I used to progress towards the
brick wall of manual.pdf - but I don't know whether there are better
preprocessor directives to use Virtualbox-side... this is nothing more
than a heads-up :)
thanks,
--alessandro
"don't underestimate the things that I will do"
(Adele, "Rolling In The Deep")
-------------- next part --------------
--- linux-4.2.0-rc5-orig/lib/string.c 2015-08-04 11:25:04.649315825 +0200
+++ linux-4.2.0-rc5/lib/string.c 2015-08-04 15:19:05.239793996 +0200
@@ -858,11 +858,11 @@
*
* Returns pointer to the nul byte at the end of @s.
*/
-char *strreplace(char *s, char old, char new)
+char *strreplace(char *s, char old, char newstr)
{
for (; *s; ++s)
if (*s == old)
- *s = new;
+ *s = newstr;
return s;
}
EXPORT_SYMBOL(strreplace);
--- linux-4.2.0-rc5-orig/include/linux/string.h 2015-08-04 11:25:02.909357388 +0200
+++ linux-4.2.0-rc5/include/linux/string.h 2015-08-04 15:19:23.484397932 +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 newstr);
extern void kfree_const(const void *x);
More information about the vbox-dev
mailing list