Chanho Park
2014-Sep-25 04:48 UTC
[syslinux] [PATCH] define _DEFAULT_SOURCE for glibc-2.20
_BSD_SOURCE was deprecated in favour of _DEFAULT_SOURCE since glibc 2.20[1]. To avoid build warning on glibc2.20, _DEFAULT_SOURCE should also be defined. [1]: https://sourceware.org/glibc/wiki/Release/2.20 Signed-off-by: Chanho Park <chanho61.park at samsung.com> --- dos/getsetsl.c | 2 ++ libinstaller/fs.c | 2 ++ libinstaller/syslxmod.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/dos/getsetsl.c b/dos/getsetsl.c index 5260a2a..c6e6ae7 100644 --- a/dos/getsetsl.c +++ b/dos/getsetsl.c @@ -5,6 +5,8 @@ #define _XOPEN_SOURCE 500 /* Required on glibc 2.x */ #define _BSD_SOURCE +/* glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE */ +#define _DEFAULT_SOURCE 1 #include <inttypes.h> #include <string.h> #include <stddef.h> diff --git a/libinstaller/fs.c b/libinstaller/fs.c index 179629e..19d69d3 100644 --- a/libinstaller/fs.c +++ b/libinstaller/fs.c @@ -18,6 +18,8 @@ #define _XOPEN_SOURCE 500 /* Required on glibc 2.x */ #define _BSD_SOURCE +/* glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE */ +#define _DEFAULT_SOURCE 1 #include <stdio.h> #include <inttypes.h> #include <string.h> diff --git a/libinstaller/syslxmod.c b/libinstaller/syslxmod.c index cc6e56a..0ec4164 100644 --- a/libinstaller/syslxmod.c +++ b/libinstaller/syslxmod.c @@ -17,6 +17,8 @@ #define _XOPEN_SOURCE 500 /* Required on glibc 2.x */ #define _BSD_SOURCE +/* glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE */ +#define _DEFAULT_SOURCE 1 #include <stdio.h> #include <inttypes.h> #include <string.h> -- 1.9.1
Ferenc Wagner
2014-Sep-25 07:42 UTC
[syslinux] [PATCH] define _DEFAULT_SOURCE for glibc-2.20
Chanho Park <chanho61.park at samsung.com> writes:> _BSD_SOURCE was deprecated in favour of _DEFAULT_SOURCE since glibc > 2.20[1]. To avoid build warning on glibc2.20, _DEFAULT_SOURCE should > also be defined.Why exactly is _BSD_SOURCE (or _DEFAULT_SOURCE) needed in the Syslinux sources? Maybe it would be worth pointing out in a comment. -- Thanks, Feri.
Chanho Park
2014-Sep-25 07:51 UTC
[syslinux] [PATCH] define _DEFAULT_SOURCE for glibc-2.20
Hi,> -----Original Message----- > From: Ferenc Wagner [mailto:wferi at niif.hu] > Sent: Thursday, September 25, 2014 4:42 PM > To: Chanho Park > Cc: syslinux at zytor.com > Subject: Re: [syslinux] [PATCH] define _DEFAULT_SOURCE for glibc-2.20 > > Chanho Park <chanho61.park at samsung.com> writes: > > > _BSD_SOURCE was deprecated in favour of _DEFAULT_SOURCE since glibc > > 2.20[1]. To avoid build warning on glibc2.20, _DEFAULT_SOURCE should > > also be defined. > > Why exactly is _BSD_SOURCE (or _DEFAULT_SOURCE) needed in the Syslinux > sources? Maybe it would be worth pointing out in a comment.Actually, I tried to remove _BSD_SOURCE because I think it's unnecessary flags. However, I'm not sure whether the removing is correct or not. Please look this mail thread[1]. [1]: http://www.syslinux.org/archives/2014-September/022643.html Best Regards, Chanho Park
On Thu, Sep 25, 2014 at 12:48 AM, Chanho Park <chanho61.park at samsung.com> wrote:> _BSD_SOURCE was deprecated in favour of _DEFAULT_SOURCE since glibc > 2.20[1]. To avoid build warning on glibc2.20, _DEFAULT_SOURCE should > also be defined. > > [1]: https://sourceware.org/glibc/wiki/Release/2.20 > > Signed-off-by: Chanho Park <chanho61.park at samsung.com>Done. -- -Gene