That's probably caused by the inclusion of linux/version.h.
I will try to find an alternative approach.
On Mon, Jan 06, 2025 at 02:33:25PM +0100, Waldemar Brodkorb wrote:
Hi Nadav,
I applied your patch and pushed it. But I am getting now following
warnings from Busybox compile:
/home/wbx/openadk/toolchain_qemu-aarch64_uclibc-ng_cortex_a53/usr/bin/aarch64-openadk-linux-uclibc-gcc
-Wp,-MD,shell/.shell_common.o.d -DNDEBUG -std=gnu99 -Iinclude -Ilibbb -include
include/autoconf.h -D_GNU_
SOURCE -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-DBB_VER='"1.36.1"' -fwrapv -fno-ident -mcpu=cortex-a53 -Os -pipe
-fomit-frame-pointer -Wall -Wshadow -Wwrite-strings -Wundef -Wstr
ict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value
-Wmissing-prototypes -Wmissing-declarations -Wno-format-security
-Wdeclaration-after-statement -Wold-style-definition -finline-limit=0 -
fno-builtin-strlen -fomit-frame-pointer -ffunction-sections -fdata-sections
-fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1
-falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-u
nwind-tables -fno-asynchronous-unwind-tables -fno-builtin-printf -Os
-DKBUILD_BASENAME='"shell_common"'
-DKBUILD_MODNAME='"shell_common"' -c -o shell/shell_common.o
shell/shell_common.c
In file included from include/libbb.h:13,
from util-linux/wall.c:29:
include/platform.h:306: warning: "KERNEL_VERSION" redefined
306 | #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
In file included from
/home/wbx/openadk/target_qemu-aarch64_uclibc-ng_cortex_a53/usr/include/features.h:434,
from
/home/wbx/openadk/target_qemu-aarch64_uclibc-ng_cortex_a53/usr/include/limits.h:26,
from
/home/wbx/openadk/toolchain_qemu-aarch64_uclibc-ng_cortex_a53/usr/lib/gcc/aarch64-openadk-linux-uclibc/13.3.0/include/limits.h:205,
from
/home/wbx/openadk/toolchain_qemu-aarch64_uclibc-ng_cortex_a53/usr/lib/gcc/aarch64-openadk-linux-uclibc/13.3.0/include/syslimits.h:7,
from
/home/wbx/openadk/toolchain_qemu-aarch64_uclibc-ng_cortex_a53/usr/lib/gcc/aarch64-openadk-linux-uclibc/13.3.0/include/limits.h:34,
from include/platform.h:157:
/home/wbx/openadk/target_qemu-aarch64_uclibc-ng_cortex_a53/usr/include/linux/version.h:2:
note: this is the location of the previous definition
2 | #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) >
255 ? 255 : (c)))
|
Any idea how to avoid this?
best regards
Waldemar
Nadav Tasher wrote,
> Friendly nudge :)
>
> On Sun, Dec 22, 2024 at 10:11:57PM +0200, Nadav Tasher wrote:
> > Using 64bit time on 32bit targets was only introduced in Linux 5.1.0.
> > On versions prior to that, compiling uClibc-ng produces incorrect headers
> > that cause the `clock_nanosleep` syscall to receive incorrect arguments.
> >
> > Signed-off-by: Nadav Tasher <tashernadav(a)gmail.com>
> > ---
> > include/features.h | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/include/features.h b/include/features.h
> > index 1a4efb9db..0b09d71a2 100644
> > --- a/include/features.h
> > +++ b/include/features.h
> > @@ -449,6 +449,12 @@
> > # include <libc-internal.h>
> > #endif
> >
> > +#include <linux/version.h>
> > +
> > +#if defined(__UCLIBC_USE_TIME64__) && __TARGET_ARCH_BITS__ == 32
&& LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0)
> > +#error 64bit time on 32bit targets is not supported on Linux < 5.1.0
> > +#endif
> > +
> > #if defined(__UCLIBC_USE_TIME64__) || __TARGET_ARCH_BITS__ == 64
> > #define __USE_TIME_BITS64 1
> > #endif
> > --
> > 2.34.1
> >
> _______________________________________________
> devel mailing list -- devel(a)uclibc-ng.org
> To unsubscribe send an email to devel-leave(a)uclibc-ng.org
>