From: Guocai He <[email protected]>
When host is centos7, fix the following build errors:
In file included from pseudolog.c:21:
/usr/include/sys/stat.h:366:31: error: array type has incomlete element type
In file included from pseudolog.c:21:
/usr/include/sys/stat.h:366:31: error: array type has incomplete element type
"struct timespec"
366 | const struct timespec __times[2],
| ^~~~~~~
pseudolog.c: In function "parse_file_type":
pseudolog.c:214:10: error: "S_IFSOCK" undeclared (first use in this function)
214 | return S_IFSOCK;
| ^~~~~~~~
pseudolog.c: In function "format_one":
pseudolog.c:754:43: error: "ALLPERM" undeclared (first use in this function)
754 | printf(fmtbuf, (unsigned int) e->mode & ALLPERMS);
| ^~~~~~~~
upstream commit:
https://git.yoctoproject.org/pseudo/commit/?id=15b4f4ca25593f684e6517d0b809605b443d1953
When the host is older system,such as centos7, this upstream commit will
introduce
the build errors. To add "#define _BSD_SOURCE" is mainly to avoid issues on
older
systems that do not recognize _DEFAULT_SOURCE.
Signed-off-by: Guocai He <[email protected]>
---
meta/recipes-devtools/pseudo/files/glibc238.patch | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/meta/recipes-devtools/pseudo/files/glibc238.patch
b/meta/recipes-devtools/pseudo/files/glibc238.patch
index dfb5c283f6..9a7cd3744d 100644
--- a/meta/recipes-devtools/pseudo/files/glibc238.patch
+++ b/meta/recipes-devtools/pseudo/files/glibc238.patch
@@ -28,6 +28,20 @@ Index: git/pseudo_wrappers.c
#include <assert.h>
#include <stdlib.h>
#include <limits.h>
+Index: git/pseudolog.c
+===================================================================
+--- git.orig/pseudolog.c
++++ git/pseudolog.c
+@@ -10,6 +10,9 @@
+ * we then don't get S_IFSOCK... _GNU_SOURCE turns on everything. */
+ #define _DEFAULT_SOURCE
+ #define _XOPEN_SOURCE
++/* This is mainly to avoid issues on older systems that do not
++ * recognize _DEFAULT_SOURCE. */
++#define _BSD_SOURCE
+
+ #include <ctype.h>
+ #include <limits.h>
Index: git/pseudo_util.c
===================================================================
--- git.orig/pseudo_util.c
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#209253):
https://lists.openembedded.org/g/openembedded-core/message/209253
Mute This Topic: https://lists.openembedded.org/mt/110385112/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-