The definition of htons() on platforms other than i386 and amd64 is missing a cast to uint16_t, which caused this FTBFS of mosh on armel and armhf:
https://launchpad.net/ubuntu/+source/mosh/1.2.1-1ubuntu1/+build/3582950
network.cc:76:28: error: narrowing conversion of '({...})' from 'unsigned int' to 'uint16_t {aka short unsigned int}' inside { } is ill-formed in C++11 [-Werror=narrowing]
network.cc:76:50: error: narrowing conversion of '({...})' from 'unsigned int' to 'uint16_t {aka short unsigned int}' inside { } is ill-formed in C++11 [-Werror=narrowing]
(We didn’t see this before because this warning is new in GCC 4.7.)
The definition of htons() on platforms other than i386 and amd64 is missing a cast to uint16_t, which caused this FTBFS of mosh on armel and armhf:
https:/ /launchpad. net/ubuntu/ +source/ mosh/1. 2.1-1ubuntu1/ +build/ 3582950
network.cc:76:28: error: narrowing conversion of '({...})' from 'unsigned int' to 'uint16_t {aka short unsigned int}' inside { } is ill-formed in C++11 [-Werror=narrowing]
network.cc:76:50: error: narrowing conversion of '({...})' from 'unsigned int' to 'uint16_t {aka short unsigned int}' inside { } is ill-formed in C++11 [-Werror=narrowing]
(We didn’t see this before because this warning is new in GCC 4.7.)
This was fixed for glibc 2.16 in sourceware. org/git/ ?p=glibc. git;a=commitdif f;h=2174c6dd855 5f654c30df2f8f3 321b69e0f736f8
http://