Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1425346
| From | Matt Ullman <staticfox@staticfox.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2] lib: Make strreplace prototype compatible with C++ |
| Date | 2016-06-17 19:30 +0200 |
| Message-ID | <rL5KG-Zn-27@gated-at.bofh.it> (permalink) |
| References | <rL5KG-Zn-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Since "new" is a keyword in C++, this breaks compilation when string.h is included in a C++ file. For example, this affects VirtualBox Guest Additions. https://www.virtualbox.org/pipermail/vbox-dev/2015-August/013368.html Signed-off-by: Matt Ullman <staticfox@staticfox.net> --- Thanks for your feedback and I agree. I've made the requested changes. include/linux/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/string.h b/include/linux/string.h index 26b6f6a..1e5183b 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -115,7 +115,7 @@ extern int memcmp(const void *,const void *,__kernel_size_t); 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 *, char, char); extern void kfree_const(const void *x); -- 2.9.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v2] lib: Make strreplace prototype compatible with C++ Matt Ullman <staticfox@staticfox.net> - 2016-06-17 19:30 +0200
Re: [PATCH v2] lib: Make strreplace prototype compatible with C++ Randy Dunlap <rdunlap@infradead.org> - 2016-06-17 20:40 +0200
Re: [PATCH v2] lib: Make strreplace prototype compatible with C++ Matt Ullman <staticfox@staticfox.net> - 2016-06-17 21:40 +0200
Re: [PATCH v2] lib: Make strreplace prototype compatible with C++ Joe Perches <joe@perches.com> - 2016-06-17 22:00 +0200
Re: [PATCH v2] lib: Make strreplace prototype compatible with C++ Matt Ullman <staticfox@staticfox.net> - 2016-06-17 22:30 +0200
csiph-web