On Mon, Jul 23, 2018 at 12:17:42PM -0400, Hal Rosenstock wrote: > On 7/19/2018 10:50 PM, Honggang LI wrote: > > From: Honggang Li <honli@xxxxxxxxxx> > > > > grep -r -l '\-D_BSD_SOURCE=1' | xargs -I {} sed -e 's/-D_BSD_SOURCE=1/-D_DEFAULT_SOURCE=1/' -i {} > > My understanding is that DEFAULT_SOURCE is glibc 2.19 or later and that glibc 2.19 or later doesn't warn if both BSD_SOURCE and DEFAULT_SOURCE are both defined. So shouldn't this define both ? Yes, you are right. Confirmed gcc-8 works when both defined. thanks > > grep -r -l '\-D_BSD_SOURCE=1' | xargs -I {} sed -e 's/-D_BSD_SOURCE=1/-D_BSD_SOURCE=1 -D_DEFAULT_SOURCE=1/' -i {} > > -- Hal > > > Signed-off-by: Honggang Li <honli@xxxxxxxxxx> > > --- > > complib/Makefile.am | 2 +- > > opensm/Makefile.am | 2 +- > > osmeventplugin/Makefile.am | 2 +- > > 3 files changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/complib/Makefile.am b/complib/Makefile.am > > index 70e5681b4c86..df44c0bdb776 100644 > > --- a/complib/Makefile.am > > +++ b/complib/Makefile.am > > @@ -9,7 +9,7 @@ else > > DBGFLAGS = -g > > endif > > > > -libosmcomp_la_CFLAGS = -Wall -Wwrite-strings $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 > > +libosmcomp_la_CFLAGS = -Wall -Wwrite-strings $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE=1 > > > > if HAVE_LD_VERSION_SCRIPT > > libosmcomp_version_script = -Wl,--version-script=$(srcdir)/libosmcomp.map > > diff --git a/opensm/Makefile.am b/opensm/Makefile.am > > index 86975d3f2147..260d6d298647 100644 > > --- a/opensm/Makefile.am > > +++ b/opensm/Makefile.am > > @@ -1,7 +1,7 @@ > > > > AM_CPPFLAGS = $(OSMV_INCLUDES) $(METIS_INCLUDES) > > > > -AM_CFLAGS = -Wall -Wwrite-strings $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 > > +AM_CFLAGS = -Wall -Wwrite-strings $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE=1 > > > > lib_LTLIBRARIES = libopensm.la > > > > diff --git a/osmeventplugin/Makefile.am b/osmeventplugin/Makefile.am > > index 01eeb0b0932d..ab42023a5220 100644 > > --- a/osmeventplugin/Makefile.am > > +++ b/osmeventplugin/Makefile.am > > @@ -10,7 +10,7 @@ else > > DBGFLAGS = -g > > endif > > > > -libosmeventplugin_la_CFLAGS = -Wall -Wwrite-strings $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 > > +libosmeventplugin_la_CFLAGS = -Wall -Wwrite-strings $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE=1 > > > > if HAVE_LD_VERSION_SCRIPT > > libosmeventplugin_version_script = -Wl,--version-script=$(srcdir)/libosmeventplugin.map > > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html