* Query on header test
@ 2021-06-10 14:12 Mukesh Ojha
0 siblings, 0 replies; only message in thread
From: Mukesh Ojha @ 2021-06-10 14:12 UTC (permalink / raw)
To: masahiroy, lkml
Hi All,
We are facing issue while compiling kernel (5.4) in android (arm64) on
ubuntu18 host machine
when header test is performed.
Note: there is no issue observed on ubuntu16.
And it is failing with below issue,
./usr/include/linux/videodev2.h:2323:20: error: field has incomplete
type 'struct timespec'
struct timespec timestamp;
^
./usr/include/linux/videodev2.h:2323:9: note: forward declaration of
'struct timespec'
struct timespec timestamp;
^
1 error generated.
where in one of the headers "include/uapi/linux/videodev2.h" is
including "sys/time.h"
Inside include/uapi/linux/videodev2.h
#ifndef __KERNEL__
#include <sys/time.h>
#endif
and it is try to search this file in host machine in
"usr/include/x86_64-linux-gnu/sys/time.h".
but it is failing with that as looks like ubuntu18 packaged
x86_64-linux-gnu time.h is not
compatible while it is compatible with ubuntu16 packaged time.h has no
issue.
Defining _GNU_SOURCE is somehow fixing the issue the somehow.
And now i am not sure whether it is maintaining as per the standard of
header test or it somehow
violates it.
diff --git a/usr/include/Makefile b/usr/include/Makefile
index bfc7f8e..7b789f7 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -8,7 +8,7 @@
# We cannot go as far as adding -Wpedantic since it emits too many
warnings.
UAPI_CFLAGS := -std=c90 -Wall -Werror=implicit-function-declaration
-override c_flags = $(UAPI_CFLAGS) -Wp,-MD,$(depfile)
-I$(objtree)/usr/include
+override c_flags = $(UAPI_CFLAGS) -Wp,-MD,$(depfile) -D_GNU_SOURCE
-I$(objtree)/usr/include
Thanks,
Mukesh
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-10 14:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 14:12 Query on header test Mukesh Ojha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).