The _BSD_SOURCE was deprecated since glibc-2.20. _DEFAULT_SOURCE can be used instead of _BSD_SOURCE. However, there is no need to include _BSD_SOURCE because the sources only have inline functions and calls memcmp/cpy functions. Signed-off-by: Chanho Park <chanho61.park at samsung.com> --- dos/getsetsl.c | 1 - libinstaller/fs.c | 1 - libinstaller/syslxmod.c | 1 - 3 files changed, 3 deletions(-) diff --git a/dos/getsetsl.c b/dos/getsetsl.c index 5260a2a..ba32b15 100644 --- a/dos/getsetsl.c +++ b/dos/getsetsl.c @@ -4,7 +4,6 @@ */ #define _XOPEN_SOURCE 500 /* Required on glibc 2.x */ -#define _BSD_SOURCE #include <inttypes.h> #include <string.h> #include <stddef.h> diff --git a/libinstaller/fs.c b/libinstaller/fs.c index 179629e..e5a854c 100644 --- a/libinstaller/fs.c +++ b/libinstaller/fs.c @@ -17,7 +17,6 @@ */ #define _XOPEN_SOURCE 500 /* Required on glibc 2.x */ -#define _BSD_SOURCE #include <stdio.h> #include <inttypes.h> #include <string.h> diff --git a/libinstaller/syslxmod.c b/libinstaller/syslxmod.c index cc6e56a..99f9995 100644 --- a/libinstaller/syslxmod.c +++ b/libinstaller/syslxmod.c @@ -16,7 +16,6 @@ */ #define _XOPEN_SOURCE 500 /* Required on glibc 2.x */ -#define _BSD_SOURCE #include <stdio.h> #include <inttypes.h> #include <string.h> -- 1.9.1
Ping?> -----Original Message----- > From: Chanho Park [mailto:chanho61.park at samsung.com] > Sent: Thursday, September 18, 2014 1:34 PM > To: syslinux at zytor.com > Cc: hpa at linux.intel.com; Chanho Park > Subject: [PATCH] remove _BSD_SOURCE definition > > The _BSD_SOURCE was deprecated since glibc-2.20. _DEFAULT_SOURCE can be > used instead of _BSD_SOURCE. However, there is no need to include > _BSD_SOURCE because the sources only have inline functions and calls > memcmp/cpy functions. > > Signed-off-by: Chanho Park <chanho61.park at samsung.com> > --- > dos/getsetsl.c | 1 - > libinstaller/fs.c | 1 - > libinstaller/syslxmod.c | 1 - > 3 files changed, 3 deletions(-) > > diff --git a/dos/getsetsl.c b/dos/getsetsl.c > index 5260a2a..ba32b15 100644 > --- a/dos/getsetsl.c > +++ b/dos/getsetsl.c > @@ -4,7 +4,6 @@ > */ > > #define _XOPEN_SOURCE 500 /* Required on glibc 2.x */ > -#define _BSD_SOURCE > #include <inttypes.h> > #include <string.h> > #include <stddef.h> > diff --git a/libinstaller/fs.c b/libinstaller/fs.c > index 179629e..e5a854c 100644 > --- a/libinstaller/fs.c > +++ b/libinstaller/fs.c > @@ -17,7 +17,6 @@ > */ > > #define _XOPEN_SOURCE 500 /* Required on glibc 2.x */ > -#define _BSD_SOURCE > #include <stdio.h> > #include <inttypes.h> > #include <string.h> > diff --git a/libinstaller/syslxmod.c b/libinstaller/syslxmod.c > index cc6e56a..99f9995 100644 > --- a/libinstaller/syslxmod.c > +++ b/libinstaller/syslxmod.c > @@ -16,7 +16,6 @@ > */ > > #define _XOPEN_SOURCE 500 /* Required on glibc 2.x */ > -#define _BSD_SOURCE > #include <stdio.h> > #include <inttypes.h> > #include <string.h> > -- > 1.9.1
On Thu, Sep 18, 2014 at 12:34 AM, Chanho Park <chanho61.park at samsung.com> wrote:> The _BSD_SOURCE was deprecated since glibc-2.20. _DEFAULT_SOURCE can be > used instead of _BSD_SOURCE. However, there is no need to include > _BSD_SOURCE because the sources only have inline functions and calls > memcmp/cpy functions.Testing this myself on my build boxes, I see no issue. The biggest thought I'd have is would there be a possibility of a platform that can still suitably build Sylinux (presume only bios architecture for now) but break with this patch? -- -Gene
Hi Gene,> -----Original Message----- > From: Gene Cumm [mailto:gene.cumm at gmail.com] > Sent: Thursday, September 25, 2014 2:12 AM > To: Chanho Park > Cc: For discussion of Syslinux and tftp-hpa; hpa at linux.intel.com > Subject: Re: [syslinux] [PATCH] remove _BSD_SOURCE definition > > On Thu, Sep 18, 2014 at 12:34 AM, Chanho Park > <chanho61.park at samsung.com> wrote: > > The _BSD_SOURCE was deprecated since glibc-2.20. _DEFAULT_SOURCE can > be > > used instead of _BSD_SOURCE. However, there is no need to include > > _BSD_SOURCE because the sources only have inline functions and calls > > memcmp/cpy functions. > > Testing this myself on my build boxes, I see no issue. The biggest > thought I'd have is would there be a possibility of a platform that > can still suitably build Sylinux (presume only bios architecture for > now) but break with this patch?You mean the Sylinux was broken due to my patch? Or you concerned it? If so, how about below patch? Subject: [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 Best Regards, Chanho Park
> On Thu, Sep 18, 2014 at 12:34 AM, Chanho Park <chanho61.park at samsung.com> wrote: > > The _BSD_SOURCE was deprecated since glibc-2.20. _DEFAULT_SOURCE can be > > used instead of _BSD_SOURCE. However, there is no need to include > > _BSD_SOURCE because the sources only have inline functions and calls > > memcmp/cpy functions. > > Testing this myself on my build boxes, I see no issue. The biggest > thought I'd have is would there be a possibility of a platform that > can still suitably build Sylinux (presume only bios architecture for > now) but break with this patch? > > -- > -GenePotential concerns: _ Syslinux's ports (e.g. to *BSD)? _ Other tools / bootloaders that are somehow related or based on Syslinux (e.g. U-boot)? _ Any of the above, BIOS/UEFI on non-x86 (e.g. *arm*)? Since I am not a developer, I wouldn't know if it matters or not. In any case, if this is not a critical bug (I have no idea), and considering that several popular Linux distros are close to release and/or freeze, perhaps this one should be left for after-6.03 (somewhat similar to the gPXE deletion from the distribution archives)? Regards, Ady.