Package: mosh Version: 1.1-1 Severity: important Tags: patch User: debian-bsd@lists.debian.org Usertags: kfreebsd
the IUTF8 termio constant isn't POSIX and isn't used on freebsd. We still have UTF-8 enabled terminals though. Find below a patch I used to make it build&work on Debian GNU/kFreeBSD Regards Christoph -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: kfreebsd-amd64 (x86_64) Kernel: kFreeBSD 9.0-1-amd64 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages mosh depends on: ii libc0.1 2.13-27 ii libgcc1 1:4.7.0-1 ii libio-pty-perl 1:1.08-1+b2 ii libncurses5 5.9-4 ii libprotobuf7 2.4.1-1 ii libstdc++6 4.7.0-1 ii libtinfo5 5.9-4 ii libutempter0 1.1.5-4 ii openssh-client 1:5.9p1-4 ii zlib1g 1:1.2.6.dfsg-2 mosh recommends no packages. mosh suggests no packages. -- no debconf information
Description: <short summary of the patch> TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . mosh (1.1-1) unstable; urgency=low . * Version 1.1 released Author: Keith Winstein <kei...@mit.edu> --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: <vendor|upstream|other>, <url of original patch> Bug: <url in upstream bugtracker> Bug-Debian: http://bugs.debian.org/<bugnumber> Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber> Forwarded: <no|not-needed|url proving that it has been forwarded> Reviewed-By: <name and email of someone who approved the patch> Last-Update: <YYYY-MM-DD> --- mosh-1.1.orig/src/examples/parse.cc +++ mosh-1.1/src/examples/parse.cc @@ -72,10 +72,12 @@ int main( int argc __attribute__((unused child_termios = saved_termios; +#ifdef __linux__ if ( !(child_termios.c_iflag & IUTF8) ) { fprintf( stderr, "Warning: Locale is UTF-8 but termios IUTF8 flag not set. Setting IUTF8 flag.\n" ); child_termios.c_iflag |= IUTF8; } +#endif pid_t child = forkpty( &master, NULL, &child_termios, NULL ); --- mosh-1.1.orig/src/examples/termemu.cc +++ mosh-1.1/src/examples/termemu.cc @@ -81,10 +81,12 @@ int main( void ) child_termios = saved_termios; +#ifdef __linux__ if ( !(child_termios.c_iflag & IUTF8) ) { fprintf( stderr, "Warning: Locale is UTF-8 but termios IUTF8 flag not set. Setting IUTF8 flag.\n" ); child_termios.c_iflag |= IUTF8; } +#endif pid_t child = forkpty( &master, NULL, &child_termios, NULL ); --- mosh-1.1.orig/src/frontend/mosh-server.cc +++ mosh-1.1/src/frontend/mosh-server.cc @@ -273,11 +273,13 @@ int run_server( const char *desired_ip, int master; +#ifdef __linux__ if ( !(child_termios.c_iflag & IUTF8) ) { /* SSH should also convey IUTF8 across connection. */ // fprintf( stderr, "Warning: Locale is UTF-8 but termios IUTF8 flag not set. Setting IUTF8 flag.\n" ); child_termios.c_iflag |= IUTF8; } +#endif /* Fork child process */ pid_t child = forkpty( &master, NULL, &child_termios, &window_size ); --- mosh-1.1.orig/src/frontend/stmclient.cc +++ mosh-1.1/src/frontend/stmclient.cc @@ -66,11 +66,13 @@ void STMClient::init( void ) /* Put terminal driver in raw mode */ raw_termios = saved_termios; +#ifdef __linux__ if ( !(raw_termios.c_iflag & IUTF8) ) { /* SSH should also convey IUTF8 across connection. */ // fprintf( stderr, "Warning: Locale is UTF-8 but termios IUTF8 flag not set. Setting IUTF8 flag.\n" ); raw_termios.c_iflag |= IUTF8; } +#endif cfmakeraw( &raw_termios );