git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Add missing #include to support TIOCGWINSZ on Solaris

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Jan 11, 2010, 10:41 UTC
Message-ID
<1263206461-4960-1-git-send-email-pclouds@gmail.com>

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>
---
 Solaris noob here. Somebody should check if it affects other platforms.
 git-compat-util.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/git-compat-util.h b/git-compat-util.h
index e5e9f39..de3a70e 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -90,6 +90,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
-- 
1.6.4.1.401.gc69a7
Message 1 of 1 in “Add missing #include to support TIOCGWINSZ on Solaris”
  1. Add missing #include to support TIOCGWINSZ on SolarisNguyễn Thái Ngọc Duy, Jan 11, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.