[riot-notifications] [RIOT-OS/RIOT] core: thread_state_t makes RIOT not compilable on MAC OSX (#11508)

Martine Lenders notifications at github.com
Fri May 10 15:48:08 CEST 2019


<!--
====================================
IF YOUR ISSUE IS RELATED TO SECURITY
====================================
please submit it to the security mailing-list security at riot-os.org.

If your issue is a question related to the usage of RIOT, please submit it to
the user mailing-list users at riot-os.org or to the developer mailing-list
devel at riot-os.org.
-->

#### Description
<!--
Example: Cannot build gnrc_networking application for samr21-xpro board.
-->

Since #10989 was merged, most RIOT applications don't compile on MAC anymore, as there is a type `thread_state_t` also defined in [Apples thread handler headers](https://opensource.apple.com/source/xnu/xnu-792/osfmk/mach/thread_status.h.auto.html). As a fix I propose to rename that type to something that collides less with that particular type.

#### Steps to reproduce the issue
Build e.g. `examples/gnrc_networking` for `native` on a MAC-OSX-based machine.
<!--
Try to describe as precisely as possible here the steps required to reproduce
the issue. Here you can also describe your hardware configuration, the network
setup, etc.
-->

#### Expected results
The application should compile.
<!--
Example: The gnrc_networking application builds on samr21-xpro.
-->

#### Actual results
The application can't compile with the following error:

```
/Users/mlenders/RIOT/core/include/sched.h:117:3: error: typedef redefinition with different types ('enum thread_state_t' vs 'natural_t *' (aka 'unsigned int *'))
} thread_state_t;
  ^
/usr/include/mach/thread_status.h:83:20: note: previous definition is here
typedef natural_t       *thread_state_t;        /* Variable-length array */
                         ^
1 error generated.
```
<!--
Please paste or specifically describe the actual output.
-->

#### Versions
<!--
Operating system: Mac OSX, Linux, Vagrant VM
Build environment: GCC, CLang versions (you can run the following command from
the RIOT base directory: ./dist/tools/ci/print_toolchain_versions.sh).
-->

<!-- Thanks for contributing! -->


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/11508
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190510/293e7854/attachment.html>


More information about the notifications mailing list