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-08 15:52:59 -0400
commit9f4e879cbcd8ff4bffcfb119c821bd4f1b7392fa (patch)
tree9c10ca87d72b12b82639caf883bbe5d3b2568185 /fixincludes/inclhack.def
parent35aca8e9b45372531afdd62492c287887b1ada51 (diff)
downloadgcc-9f4e879cbcd8ff4bffcfb119c821bd4f1b7392fa.zip
gcc-9f4e879cbcd8ff4bffcfb119c821bd4f1b7392fa.tar.gz
gcc-9f4e879cbcd8ff4bffcfb119c821bd4f1b7392fa.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. (cherry picked from commit 03b634c8e0d3e8628ced79fc4f40873e12a3039c)
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 3a4cfe0..066bef9 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 = {