Bug#869385: higan: FTBFS on arm64, mips* - error: unknown type name 'thread_local'

2017-07-23 Thread Adrian Bunk
Control: tags -1 patch

On Sat, Jul 22, 2017 at 11:34:45PM +0100, James Cowgill wrote:
>...
> > In file included from ../libco/libco.c:22:0:
> > ../libco/sjlj.c:30:8: error: unknown type name 'thread_local'
> >  static thread_local cothread_struct co_primary;
> > ^~~~
> 
> This appears to be because the code uses C11's "thread_local" storage
> type without including "threads.h" where it's declared.
> 
> Note I haven't done a test rebuild yet - I'm just guessing that this is
> the cause.

higan actually has an own header settings.h that defines an own thread_local
(to __thread or empty).

The attached patch fixes the FTBFS by including that header just like 
the arch-specific implementations do.

These thread_local #define's in libco/settings.h should also be replaced 
with an #include , but that's a separate issue.

> Thanks,
> James

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

Description: sjlj.c needs settings.h for thread_local
Author: Adrian Bunk 
Bug-Debian: https://bugs.debian.org/869385

--- higan-103.orig/libco/sjlj.c
+++ higan-103/libco/sjlj.c
@@ -12,6 +12,7 @@
 #define LIBCO_C
 #define _XOPEN_SOURCE 700
 #include "libco.h"
+#include "settings.h"
 
 #include 
 #include 


Bug#869385: higan: FTBFS on arm64, mips* - error: unknown type name 'thread_local'

2017-07-22 Thread James Cowgill
Source: higan
Version: 103-1
Severity: serious
Tags: sid buster

Hi,

higan FTBFS on arm64, mips* and some ports architectures with the error:
> In file included from ../libco/libco.c:22:0:
> ../libco/sjlj.c:30:8: error: unknown type name 'thread_local'
>  static thread_local cothread_struct co_primary;
> ^~~~

This appears to be because the code uses C11's "thread_local" storage
type without including "threads.h" where it's declared.

Note I haven't done a test rebuild yet - I'm just guessing that this is
the cause.

Thanks,
James



signature.asc
Description: OpenPGP digital signature