← Back to team overview

touch-packages team mailing list archive

[Bug 1384390] Re: mir examples/progressbar.c uses internal C define (can't build on other distros)

 

** Also affects: mir (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: mir (Ubuntu)
   Importance: Undecided => Medium

** Changed in: mir (Ubuntu)
       Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mir in Ubuntu.
https://bugs.launchpad.net/bugs/1384390

Title:
  mir examples/progressbar.c uses internal C define (can't build on
  other distros)

Status in Mir:
  Fix Committed
Status in “mir” package in Ubuntu:
  Triaged

Bug description:
  This example program does #define __USE_BSD 1 but the __USE_BSD macro
  is an internal private define for use by the C library itself.  This
  causes problems with newer versions of glibc.

  The correct solution here is to use _BSD_SOURCE but apparently this is
  deprecated in newer versions of glibc for favour of _DEFAULT_SOURCE.

  In order to work with both old and new we should define both as
  explained here:

  /* _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
     _DEFAULT_SOURCE.  If _DEFAULT_SOURCE is present we do not
     issue a warning; the expectation is that the source is being
     transitioned to use the new macro.  */
  #if (defined _BSD_SOURCE || defined _SVID_SOURCE) \
      && !defined _DEFAULT_SOURCE
  # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
  # undef  _DEFAULT_SOURCE
  # define _DEFAULT_SOURCE        1
  #endif

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1384390/+subscriptions