Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin Buckley <calvin@cmpct.info>2018-06-19 16:18:25 +0300
committerMarek Safar <marek.safar@gmail.com>2018-06-19 16:36:25 +0300
commited31064357cf8decf4316181810461bb11561dc1 (patch)
treeff3ac58d54fb41afd3af9efd38e728e1ec3d7856
parenta81ee32770b5fdc65b1c5fb664404ce1d736b342 (diff)
Backport getline fix for AIX to Mono CoreFX
-rw-r--r--src/Native/Unix/System.Native/pal_io.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Native/Unix/System.Native/pal_io.c b/src/Native/Unix/System.Native/pal_io.c
index acb0097347..5a5fb824e6 100644
--- a/src/Native/Unix/System.Native/pal_io.c
+++ b/src/Native/Unix/System.Native/pal_io.c
@@ -2,11 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#ifdef _AIX
-// For getline (declare this before stdio)
-#define _GETDELIM 1
-#endif
-
#include "pal_compiler.h"
#include "pal_config.h"
#include "pal_errno.h"
@@ -47,6 +42,11 @@
// Somehow, AIX mangles the definition for this behind a C++ def
// Redeclare it here
extern int getpeereid(int, uid_t *__restrict__, gid_t *__restrict__);
+// This function declaration is hidden behind `_XOPEN_SOURCE=700`, but we need
+// `_ALL_SOURCE` to build the runtime, and that resets that definition to 600.
+// Instead of trying to wrangle ifdefs in system headers with more definitions,
+// just declare it here.
+extern ssize_t getline(char **, size_t *, FILE *);
#endif
#if HAVE_STAT64