fix memory leak due to double call to getaddrinfo in gethostbyname*
[musl] / src / stdio / __stdout_write.c
index 4683ffc..200fe2c 100644 (file)
@@ -1,10 +1,12 @@
 #include "stdio_impl.h"
+#include <termios.h>
+#include <sys/ioctl.h>
 
 size_t __stdout_write(FILE *f, const unsigned char *buf, size_t len)
 {
        struct termios tio;
        f->write = __stdio_write;
-       if (!(f->flags & F_SVB) && syscall(SYS_ioctl, f->fd, TCGETS, &tio))
+       if (!(f->flags & F_SVB) && __syscall(SYS_ioctl, f->fd, TCGETS, &tio))
                f->lbf = -1;
        return __stdio_write(f, buf, len);
 }