[Bug 1016349] Re: htons() returns wrong type on non-{i386, amd64} platforms

Clint Byrum clint at fewbar.com
Wed Sep 12 22:21:20 UTC 2012

Hello Anders, or anyone else affected,

Accepted eglibc into precise-proposed. The package will build now and be
available at http://launchpad.net/ubuntu/+source/eglibc/2.15-0ubuntu10.1
in a few hours, and then in the -proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed.  Your feedback will aid us getting this update
out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from
verification-needed to verification-done.  If it does not, change the
tag to verification-failed.  In either case, details of your testing
will help us make a better decision.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in

** Changed in: eglibc (Ubuntu Precise)
       Status: In Progress => Fix Committed

** Tags added: verification-needed

You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to eglibc in Ubuntu.

  htons() returns wrong type on non-{i386,amd64} platforms

Status in Embedded GLIBC:
  Fix Released
Status in “eglibc” package in Ubuntu:
  Fix Released
Status in “eglibc” source package in Precise:
  Fix Committed
Status in “glibc” package in Fedora:

Bug description:
  htons() on non x86 platforms is missing a cast to uint16_t which causes FTBFS of mosh on armel and armhf.

  [Development Fix]
  This has been fixed in eglibc in Quantal.

  [Stable Fix]
  A fix can be backported from the Quantal development version into Precise.

  [Test Case]
  See https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1016349/comments/2
  On how to reproduce with a C program.

  [Regression Potential]
  This patch affects some of the generic byteswaping code in eglibc. The fix for x86 arches was already completed years ago, and this patch fixes is for other arches.


  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:

  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

To manage notifications about this bug go to:

More information about the foundations-bugs mailing list