diff mbox series

[uclibc-ng-devel,1/1] aarch64/sys/ucontext.h: include bits/sigcontext.h

Message ID 20180128151829.6582-1-bernd.kuhls@t-online.de
State Accepted
Headers show
Series [uclibc-ng-devel,1/1] aarch64/sys/ucontext.h: include bits/sigcontext.h | expand

Commit Message

Bernd Kuhls Jan. 28, 2018, 3:18 p.m. UTC
Fixes a buildroot build error with ffmpeg

In file included from /home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/signal.h:329:0,
                 from fftools/ffmpeg.h:26,
                 from fftools/ffmpeg_opt.c:23:
/home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/sys/ucontext.h:52:16:
 error: field 'uc_mcontext' has incomplete type
     mcontext_t uc_mcontext;
                ^~~~~~~~~~~

using this defconfig:

BR2_aarch64=y
BR2_PACKAGE_FFMPEG=y

sys/ucontext.h for other archs already include bits/sigcontext.h,
on aarch64 this is needed as well.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 libc/sysdeps/linux/aarch64/sys/ucontext.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Thomas Petazzoni Jan. 30, 2018, 10:26 p.m. UTC | #1
Hello,

On Sun, 28 Jan 2018 16:18:29 +0100, Bernd Kuhls wrote:
> Fixes a buildroot build error with ffmpeg
> 
> In file included from /home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/signal.h:329:0,
>                  from fftools/ffmpeg.h:26,
>                  from fftools/ffmpeg_opt.c:23:
> /home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/sys/ucontext.h:52:16:
>  error: field 'uc_mcontext' has incomplete type
>      mcontext_t uc_mcontext;
>                 ^~~~~~~~~~~
> 
> using this defconfig:
> 
> BR2_aarch64=y
> BR2_PACKAGE_FFMPEG=y
> 
> sys/ucontext.h for other archs already include bits/sigcontext.h,
> on aarch64 this is needed as well.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---

Waldemar, any comment on this? Bernd also submitted this patch in
Buildroot, but I'd like to have your review on it before merging on
Buildroot's side.

Thanks!

Thomas
Waldemar Brodkorb Jan. 31, 2018, 4:11 a.m. UTC | #2
Hi,

all good, it is already queued and will
be pushed soon (uclibc-ng).

So please apply,

best regards

 Waldemar 

> Am 30.01.2018 um 23:26 schrieb Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> 
> Hello,
> 
>> On Sun, 28 Jan 2018 16:18:29 +0100, Bernd Kuhls wrote:
>> Fixes a buildroot build error with ffmpeg
>> 
>> In file included from /home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/signal.h:329:0,
>>                 from fftools/ffmpeg.h:26,
>>                 from fftools/ffmpeg_opt.c:23:
>> /home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/sys/ucontext.h:52:16:
>> error: field 'uc_mcontext' has incomplete type
>>     mcontext_t uc_mcontext;
>>                ^~~~~~~~~~~
>> 
>> using this defconfig:
>> 
>> BR2_aarch64=y
>> BR2_PACKAGE_FFMPEG=y
>> 
>> sys/ucontext.h for other archs already include bits/sigcontext.h,
>> on aarch64 this is needed as well.
>> 
>> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
>> ---
> 
> Waldemar, any comment on this? Bernd also submitted this patch in
> Buildroot, but I'd like to have your review on it before merging on
> Buildroot's side.
> 
> Thanks!
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
>
Waldemar Brodkorb Feb. 4, 2018, 3:52 p.m. UTC | #3
Hi Bernd,
Bernd Kuhls wrote,

> Fixes a buildroot build error with ffmpeg
> 
> In file included from /home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/signal.h:329:0,
>                  from fftools/ffmpeg.h:26,
>                  from fftools/ffmpeg_opt.c:23:
> /home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/sys/ucontext.h:52:16:
>  error: field 'uc_mcontext' has incomplete type
>      mcontext_t uc_mcontext;
>                 ^~~~~~~~~~~
> 
> using this defconfig:
> 
> BR2_aarch64=y
> BR2_PACKAGE_FFMPEG=y
> 
> sys/ucontext.h for other archs already include bits/sigcontext.h,
> on aarch64 this is needed as well.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

Thanks, patch is pushed,

 best regards
   Waldemar
diff mbox series

Patch

diff --git a/libc/sysdeps/linux/aarch64/sys/ucontext.h b/libc/sysdeps/linux/aarch64/sys/ucontext.h
index d17458896..dc7303b54 100644
--- a/libc/sysdeps/linux/aarch64/sys/ucontext.h
+++ b/libc/sysdeps/linux/aarch64/sys/ucontext.h
@@ -26,6 +26,10 @@ 
 
 #include <sys/procfs.h>
 
+/* We need the signal context definitions even if they are not used
+   included in <signal.h>.  */
+#include <bits/sigcontext.h>
+
 typedef elf_greg_t greg_t;
 
 /* Container for all general registers.  */