[Mesa-dev] [PATCH 2/5] android: radeonsi: fix building error in si_shader.c

Michel Dänzer michel at daenzer.net
Mon Feb 8 07:09:37 UTC 2016


On 07.02.2016 08:56, Mauro Rossi wrote:
> From e33d112be85e86c2537c26622969dea7dfd16186 Mon Sep 17 00:00:00 2001
> From: Mauro Rossi <issor.oruam at gmail.com <mailto:issor.oruam at gmail.com>>
> Date: Sat, 6 Feb 2016 23:54:24 +0100
> Subject: [PATCH 2/2] android: radeonsi: fix building error in si_shader.c
> 
> Android Bionic does not support strchrnul() function,
> causing the following building error:
> 
> external/mesa/src/gallium/drivers/radeonsi/si_shader.c:3863: error:
> undefined reference to 'strchrnul'
> collect2: error: ld returned 1 exit status
> ---
>  src/gallium/drivers/radeonsi/si_shader.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c
> b/src/gallium/drivers/radeonsi/si_shader.c
> index d9ed6b2..1b5e984 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -49,6 +49,10 @@
>  
>  #include <errno.h>
>  
> +#if defined(__ANDROID__)

This guard needs to be in the header, as I suggested.


> +#include "strchrnul.h"

This should be

#include <strchrnul.h>

The "..." syntax is for files which are located in the same directory as
the file which has the #include statement.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list