[Mesa-dev] [PATCH] c99_alloca.h: Include stdlib.h on all non-Windows.
Brian Paul
brianp at vmware.com
Mon Mar 2 08:19:57 PST 2015
On 03/01/2015 01:52 PM, Vinson Lee wrote:
> Fix build on FreeBSD.
>
> Bugzilla: https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D89364&d=AwIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=T0t4QG7chq2ZwJo6wilkFznRSFy-8uDKartPGbomVj8&m=omCcGDEwR9xvB9Yq09DejaNkoJS6xxLii6Bf-VRxgxU&s=lm351796ygp0YBGoMPb1rJQCw_OuW-hb9I5RG8mRWmM&e=
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> include/c99_alloca.h | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/include/c99_alloca.h b/include/c99_alloca.h
> index 7a81c50..575f719 100644
> --- a/include/c99_alloca.h
> +++ b/include/c99_alloca.h
> @@ -35,13 +35,9 @@
>
> # define alloca _alloca
>
> -#elif defined(__MINGW32__)
> -
> -# include <malloc.h>
> -
> #else /* !defined(_MSC_VER) */
>
> -# include <alloca.h>
> +# include <stdlib.h>
>
> #endif /* !defined(_MSC_VER) */
>
>
OK, on MinGW it looks like stdlib.h includes malloc.h which includes
alloca.h On Linux, stdlib.h includes alloca.h directly.
Tested-by: Brian Paul <brianp at vmware.com>
I'll commit this.
More information about the mesa-dev
mailing list