From 198d93fab0659f7a548329d742de8b3e27cfd977 Mon Sep 17 00:00:00 2001
From: Maarten ter Huurne <maarten@treewalker.org>
Date: Fri, 12 Sep 2014 18:28:51 +0200
Subject: [PATCH] Combined musl compile fixes
The individual patches and their descriptions can be found here:
https://github.com/raspberrypi/userland/pull/201
Upstream status: accepted (4333d6d)
However, bumping to that revision is currently not an option since that
also pulls in 66338d3 which breaks Weston:
http://lists.busybox.net/pipermail/buildroot/2014-October/109309.html
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
containers/CMakeLists.txt | 2 +-
host_applications/linux/apps/hello_pi/CMakeLists.txt | 2 +-
host_applications/linux/apps/hello_pi/libs/vgfont/Makefile | 1 -
interface/vcos/pthreads/vcos_platform.h | 3 ---
interface/vcos/pthreads/vcos_pthreads.c | 2 +-
interface/vmcs_host/linux/vcfilesys.c | 4 ++--
6 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/containers/CMakeLists.txt b/containers/CMakeLists.txt
index 721f74f..a29a885 100644
--- a/containers/CMakeLists.txt
+++ b/containers/CMakeLists.txt
@@ -13,7 +13,7 @@ add_definitions(-DDL_PATH_PREFIX="${VMCS_PLUGIN_DIR}/")
SET( GCC_COMPILER_FLAGS -Wall -g -O2 -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wcast-qual -Wwrite-strings -Wundef )
SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wextra )#-Wno-missing-field-initializers )
-SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -D__STDC_VERSION__=199901L )
+SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -std=c99 -D_POSIX_C_SOURCE=199309L )
SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wno-missing-field-initializers )
SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wno-unused-value )
diff --git a/host_applications/linux/apps/hello_pi/CMakeLists.txt b/host_applications/linux/apps/hello_pi/CMakeLists.txt
index ab4dae3..f2c6aef 100644
--- a/host_applications/linux/apps/hello_pi/CMakeLists.txt
+++ b/host_applications/linux/apps/hello_pi/CMakeLists.txt
@@ -24,7 +24,7 @@ add_subdirectory(hello_teapot)
set(VGFONT_SRCS libs/vgfont/font.c libs/vgfont/vgft.c libs/vgfont/graphics.c)
-set_source_files_properties(${VGFONT_SRCS} PROPERTIES COMPILE_DEFINITIONS "_HAVE_TIMER_T")
+set_source_files_properties(${VGFONT_SRCS} PROPERTIES COMPILE_DEFINITIONS)
add_library(vgfont ${VGFONT_SRCS})
add_subdirectory(hello_font)
diff --git a/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile b/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile
index d04fb08..1e2a22b 100755
--- a/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile
+++ b/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile
@@ -2,7 +2,6 @@ OBJS=font.o vgft.o graphics.o
INCLUDES+=-I$(SDKSTAGE)/usr/include/freetype2 -I$(SDKSTAGE)/usr/include -I$(SDKSTAGE)/usr/include/arm-linux-gnueabi
include ../../Makefile.include
diff --git a/interface/vcos/pthreads/vcos_platform.h b/interface/vcos/pthreads/vcos_platform.h
index 468098b..2095e25 100755