Fix tools/console to build on NetBSD.

- include headers needed to build on NetBSD
 - Remove unused pty.h
 - Initialize spty terminal before actually using it

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
This commit is contained in:
Keir Fraser committed 2007-09-20 16:02:22 +01:00
1 parent b35124143b
commit c11a94127d
2 files changed
+4 -3

No files matched your search

+3 -3
View File
@@ -34,7 +34,7 @@
#include <sys/select.h>
#include <err.h>
#include <errno.h>
#include <pty.h>
#include <string.h>
#include "xs.h"
@@ -113,9 +113,8 @@ static void init_term(int fd, struct termios *old)
{
struct termios new_term;
if (tcgetattr(fd, old) == -1) {
if (tcgetattr(fd, old) == -1)
return;
}
new_term = *old;
cfmakeraw(&new_term);
@@ -289,6 +288,7 @@ int main(int argc, char **argv)
err(errno, "Could not read tty from store");
}
init_term(spty, &attr);
init_term(STDIN_FILENO, &attr);
console_loop(spty, xs, path);
restore_term(STDIN_FILENO, &attr);
+1
View File
@@ -32,6 +32,7 @@
#include <sys/socket.h>
#include <sys/un.h>
#include <string.h>
#include <signal.h>
#include "xenctrl.h"
#include "utils.h"
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.