diff options
author | Joe Marcus Clarke <marcus@shumai.marcuscom.com> | 2007-08-25 20:23:36 -0400 |
---|---|---|
committer | Florent Thoumie <flz@FreeBSD.org> | 2007-08-26 13:23:36 +0100 |
commit | a0a4451df57693a7cd4f69befd4cf17239013161 (patch) | |
tree | c2c127bd24b2c52f2bf799477fbfd39e987849a6 | |
parent | d643acbb50eb2cccc50df8b27bd2c08bdc405622 (diff) |
Add support for FreeBSD
Allow this test to properly determine the current tty device.
Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
-rw-r--r-- | src/test-tty-idle-monitor.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test-tty-idle-monitor.c b/src/test-tty-idle-monitor.c index 725505d..030eba5 100644 --- a/src/test-tty-idle-monitor.c +++ b/src/test-tty-idle-monitor.c @@ -81,10 +81,14 @@ main (int argc, char **argv) g_type_init (); if (argc < 2) { +#if defined(__FreeBSD__) + device = ttyname (0); +#else device = g_file_read_link ("/proc/self/fd/0", NULL); if (device == NULL) { device = g_strdup ("/proc/self/fd/0"); } +#endif } else { device = g_strdup (argv[1]); } |