aboutsummaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
authorClément Chigot <clement.chigot@atos.net>2021-07-05 11:19:44 -0400
committerDavid Edelsohn <dje.gcc@gmail.com>2021-07-06 15:30:52 -0400
commit03b634c8e0d3e8628ced79fc4f40873e12a3039c (patch)
treefb56cf05022b57f184d31797a943de6b966a2f45 /fixincludes/inclhack.def
parentf65878178ab05180a5937f11f8fdb755678a82ce (diff)
downloadgcc-03b634c8e0d3e8628ced79fc4f40873e12a3039c.zip
gcc-03b634c8e0d3e8628ced79fc4f40873e12a3039c.tar.gz
gcc-03b634c8e0d3e8628ced79fc4f40873e12a3039c.tar.bz2
fixincludes: AIX socket.h.
Add more context to aix_externcpp1 selection to ensure that the fix is correctly applied even in future AIX versions. fixincludes/Changelog: 2021-07-01 Clément Chigot <clement.chigot@atos.net> * inclhack.def (aix_externcpp1): Improve select regexp. * fixincl.x: Regenerate. * tests/base/sys/socket.h: Update.
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def9
1 files changed, 6 insertions, 3 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 4db3117..b7ad698 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -554,13 +554,16 @@ fix = {
mach = "*-*-aix*";
files = "sys/socket.h";
select = "#ifndef _KERNEL\n"
- "#ifdef __cplusplus";
+ "#ifdef __cplusplus\n"
+ "extern \"C\" int naccept\\(int, struct sockaddr \\*, socklen_t \\*\\);";
c_fix = format;
c_fix_arg = "#ifndef _KERNEL\n"
"#ifdef __cplusplus\n"
- "extern \"C++\" {";
+ "extern \"C++\" {\n"
+ "extern \"C\" int naccept(int, struct sockaddr *, socklen_t *);";
test_text = "#ifndef _KERNEL\n"
- "#ifdef __cplusplus";
+ "#ifdef __cplusplus\n"
+ "extern \"C\" int naccept(int, struct sockaddr *, socklen_t *);";
};
fix = {