From 1ea99cdd4d1fde55b352a7fd65ccb2855212c975 Mon Sep 17 00:00:00 2001 From: ehofman Date: Sun, 23 Nov 2003 10:04:45 +0000 Subject: [PATCH] MacOS X fixes --- simgear/metar/Local.h | 2 +- simgear/scene/material/matlib.cxx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/simgear/metar/Local.h b/simgear/metar/Local.h index 10f9081c..b65ec718 100644 --- a/simgear/metar/Local.h +++ b/simgear/metar/Local.h @@ -1107,7 +1107,7 @@ char *rptstrip(char *); char *rptfmt(char *); char *rptfmti(char *, unsigned short int); -#ifndef __FreeBSD__ // strnstr is already defined on FreeBSD +#if !defined(__FreeBSD__) && !defined(__APPLE__) // strnstr is already defined on FreeBSD / Darwin char *strnstr(char *, char *, size_t); #endif diff --git a/simgear/scene/material/matlib.cxx b/simgear/scene/material/matlib.cxx index 9d0ee86d..79404622 100644 --- a/simgear/scene/material/matlib.cxx +++ b/simgear/scene/material/matlib.cxx @@ -178,7 +178,8 @@ static int gen_taxiway_dir_light_map( int r, int g, int b, int alpha ) { static int gen_vasi_light_map() { const int env_tex_res = 256; int half_res = env_tex_res / 2; - unsigned char env_map[env_tex_res][env_tex_res][4]; + + static unsigned char env_map[env_tex_res][env_tex_res][4]; GLuint tex_name; for ( int i = 0; i < env_tex_res; ++i ) { -- 2.39.5