touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #37291
[Bug 1384390] Re: mir examples/progressbar.c uses internal C define (can't build on other distros)
** Changed in: mir
Status: Fix Committed => Fix Released
** Changed in: mir (Ubuntu)
Status: Triaged => Fix Released
--
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 Released
Status in “mir” package in Ubuntu:
Fix Released
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