aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
Diffstat (limited to 'libio')
-rw-r--r--libio/iofdopen.c2
-rw-r--r--libio/stdio.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/libio/iofdopen.c b/libio/iofdopen.c
index ee8caa3604..1c76ba7a4f 100644
--- a/libio/iofdopen.c
+++ b/libio/iofdopen.c
@@ -132,7 +132,7 @@ _IO_new_fdopen (fd, mode)
#endif
if (INTUSE(_IO_file_attach) ((_IO_FILE *) &new_f->fp, fd) == NULL)
{
- INTUSE(_IO_setb) (&new_f->fp, NULL, NULL, 0);
+ INTUSE(_IO_setb) (&new_f->fp.file, NULL, NULL, 0);
INTUSE(_IO_un_link) (&new_f->fp);
free (new_f);
return NULL;
diff --git a/libio/stdio.c b/libio/stdio.c
index 64a8ab2d57..8dc24ed98f 100644
--- a/libio/stdio.c
+++ b/libio/stdio.c
@@ -40,9 +40,14 @@ _IO_FILE *stderr = (FILE *) &_IO_2_1_stderr_;
#undef _IO_stderr
#ifdef _LIBC
# define AL(name) AL2 (name, _IO_##name)
-# define AL2(name, al) \
- extern __typeof (name) al __attribute__ ((alias (#name), \
- visibility ("hidden")))
+# if defined HAVE_VISIBILITY_ATTRIBUTE
+# define AL2(name, al) \
+ extern __typeof (name) al __attribute__ ((alias (#name), \
+ visibility ("hidden")))
+# else
+# define AL2(name, al) \
+ extern __typeof (name) al __attribute__ ((alias (#name)))
+# endif
AL(stdin);
AL(stdout);
AL(stderr);