Skip to content

Commit d3a755a

Browse files
committed
Fix build warnings on Illumos
- There is no such thing as TIOCWINSZ, only TIOCGWINSZ - Include termios.h in def.h, forward decl. of openpty() Signed-off-by: Joachim Wiberg <[email protected]>
1 parent fcb4cbd commit d3a755a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/openpty.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ openpty(int *amaster, int *aslave, char *name, struct termios *termp,
8282
if (name && (nm = ttyname(s)))
8383
strcpy(name, nm);
8484
if (winp)
85-
(void)ioctl(s, TIOCWINSZ, winp);
85+
(void)ioctl(s, TIOCGWINSZ, winp);
8686

8787
return (0);
8888
}

src/def.h

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343

4444
#include <signal.h>
4545
#include <sys/stat.h>
46+
#include <termios.h> /* struct winsize et al. */
4647

4748
#ifndef HAVE_STRLCPY
4849
size_t strlcpy(char *dst, const char *src, size_t siz);

0 commit comments

Comments
 (0)