Add missing #include to support TIOCGWINSZ on Solaris
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Mon, 11 Jan 2010 10:41:01 +0000 (17:41 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Jan 2010 03:55:33 +0000 (19:55 -0800)
On Linux TIOCGWINSZ is defined somehwere in ioctl.h, which is already
included. On Solaris we also need to include termios.h. Without this
term_columns() in help.c will think TIOCGWINSZ is not supported and
always return 80 columns.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h

index 5c59687..a979e41 100644 (file)
@@ -96,6 +96,7 @@
 #include <sys/poll.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
+#include <termios.h>
 #ifndef NO_SYS_SELECT_H
 #include <sys/select.h>
 #endif