On Sun, Aug 5, 2018 at 2:50 AM Max Krummenacher <max.oss...@gmail.com> wrote: > > Hi > > Am Samstag, den 04.08.2018, 19:07 -0700 schrieb Khem Raj: > > Signed-off-by: Khem Raj <raj.k...@gmail.com> > > --- > > .../0001-tests-Include-linux-stat.h.patch | 76 +++++++++++++++++++ > > meta/recipes-devtools/strace/strace_4.23.bb | 1 + > > 2 files changed, 77 insertions(+) > > create mode 100644 > > meta/recipes-devtools/strace/strace/0001-tests-Include-linux-stat.h.patch > > > > diff --git > > a/meta/recipes-devtools/strace/strace/0001-tests-Include-linux-stat.h.patch > > b/meta/recipes-devtools/strace/strace/0001-tests-Include-linux-stat.h.patch > > new file mode 100644 > > index 0000000000..cbb9c60de7 > > --- /dev/null > > +++ > > b/meta/recipes-devtools/strace/strace/0001-tests-Include-linux-stat.h.patch > > @@ -0,0 +1,76 @@ > > +From 264889246fcdd486867e8ca923094afa1689126c Mon Sep 17 00:00:00 2001 > > +From: Khem Raj <raj.k...@gmail.com> > > +Date: Sat, 4 Aug 2018 13:18:03 -0700 > > +Subject: [PATCH] tests: Include linux/stat.h > > + > > +Starting with glibc 2.28, sys/stat.h header will have the > > +definition for struct statx, in which case including linux/stat.h should > > be > > +avoided, in order to prevent a duplicate definition. > > + > > +Signed-off-by: Khem Raj <raj.k...@gmail.com> > > +--- > > +Upstream-Status: Submitted > > [https://lists.strace.io/pipermail/strace-devel/2018-August/008329.htm > > l] > > + tests-m32/statx.c | 7 +++++++ > > + tests-mx32/statx.c | 8 +++++++- > > + tests/statx.c | 8 +++++++- > > + 3 files changed, 21 insertions(+), 2 deletions(-) > > + > > +diff --git a/tests-m32/statx.c b/tests-m32/statx.c > > +index 816b7eb..7364a02 100644 > > +--- a/tests-m32/statx.c > > ++++ b/tests-m32/statx.c > > +@@ -30,6 +30,13 @@ > > + > > + #ifdef __NR_statx > > + > > ++# if defined(__GLIBC__) > > ++# if !__GLIBC_PREREQ(2,28) > > ++# include <linux/stat.h> > > ++# endif > > ++# else > > ++# include <linux/stat.h> > > ++# endif > > + # include <linux/stat.h> > > Shouldn't the unconditional include be removed? >
yes. > Max > > > + # include "xlat.h" > > + # include "xlat/statx_masks.h" > > +diff --git a/tests-mx32/statx.c b/tests-mx32/statx.c > > +index 816b7eb..e9f9993 100644 > > +--- a/tests-mx32/statx.c > > ++++ b/tests-mx32/statx.c > > +@@ -30,7 +30,13 @@ > > + > > + #ifdef __NR_statx > > + > > +-# include <linux/stat.h> > > ++# if defined(__GLIBC__) > > ++# if !__GLIBC_PREREQ(2,28) > > ++# include <linux/stat.h> > > ++# endif > > ++# else > > ++# include <linux/stat.h> > > ++# endif > > + # include "xlat.h" > > + # include "xlat/statx_masks.h" > > + # include "xlat/statx_attrs.h" > > +diff --git a/tests/statx.c b/tests/statx.c > > +index 816b7eb..e9f9993 100644 > > +--- a/tests/statx.c > > ++++ b/tests/statx.c > > +@@ -30,7 +30,13 @@ > > + > > + #ifdef __NR_statx > > + > > +-# include <linux/stat.h> > > ++# if defined(__GLIBC__) > > ++# if !__GLIBC_PREREQ(2,28) > > ++# include <linux/stat.h> > > ++# endif > > ++# else > > ++# include <linux/stat.h> > > ++# endif > > + # include "xlat.h" > > + # include "xlat/statx_masks.h" > > + # include "xlat/statx_attrs.h" > > +-- > > +2.18.0 > > + > > diff --git a/meta/recipes-devtools/strace/strace_4.23.bb b/meta/recipes- > > devtools/strace/strace_4.23.bb > > index 0c159fc6f6..d966a77b89 100644 > > --- a/meta/recipes-devtools/strace/strace_4.23.bb > > +++ b/meta/recipes-devtools/strace/strace_4.23.bb > > @@ -14,6 +14,7 @@ SRC_URI = > > "https://strace.io/files/${PV}/strace-${PV}.tar.xz \ > > file://mips-SIGEMT.patch \ > > file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \ > > > > file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \ > > + file://0001-tests-Include-linux-stat.h.patch \ > > " > > SRC_URI[md5sum] = "fad4bba0947553cef34d46a9fd78f039" > > SRC_URI[sha256sum] = > > "7860a6965f1dd832747bd8281a04738274398d32c56e9fbd0a68b1bb9ec09aad" > > -- > > 2.18.0 > > -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core