lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 10 Jun 2021 19:42:20 +0530
From:   Mukesh Ojha <mojha@...eaurora.org>
To:     masahiroy@...nel.org, lkml <linux-kernel@...r.kernel.org>
Subject: Query on header test

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ