mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys: Fix pthread includes to support avr-libs
Missing malloc.h and clock_id_t were causing issues to build. It was tested with this configuration: - linux ubuntu 14.04.5 - arduino-mega2560 board - avr-libc-1.8.0-4.1 This change was needed to build iotivity example Bug: https://github.com/RIOT-OS/RIOT/issues/6241 Change-Id: I82ce246093b3467dfe9746f999bcc9335dbb65f6 Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
This commit is contained in:
parent
78c3c29677
commit
20c3aaa448
@ -22,6 +22,10 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifndef __WITH_AVRLIBC__
|
||||
#define HAVE_MALLOC_H 1
|
||||
#endif
|
||||
|
||||
#include "mutex.h"
|
||||
#include "sched.h"
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
# include "msp430_types.h"
|
||||
#endif
|
||||
|
||||
#if defined(__MACH__)
|
||||
#if defined(__MACH__) || defined(__WITH_AVRLIBC__)
|
||||
typedef int clockid_t;
|
||||
#endif
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
* @}
|
||||
*/
|
||||
|
||||
#include <malloc.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
@ -34,6 +33,10 @@
|
||||
|
||||
#include "pthread.h"
|
||||
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#define ENABLE_DEBUG (0)
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
|
@ -16,10 +16,12 @@
|
||||
* @}
|
||||
*/
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
#include "pthread.h"
|
||||
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#define ENABLE_DEBUG (0)
|
||||
#include "debug.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user