diff options
author | deischen <deischen@FreeBSD.org> | 2008-04-08 08:33:20 +0800 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2008-04-08 08:33:20 +0800 |
commit | 677c46c18b947561f113f3ef8381c4d86821c2c1 (patch) | |
tree | 80805704be6349ed8159cb627126d2ff83cdd681 /lang | |
parent | dff93b48ec6e33a3101139e27dcf1afac7daded4 (diff) | |
download | freebsd-ports-gnome-677c46c18b947561f113f3ef8381c4d86821c2c1.tar.gz freebsd-ports-gnome-677c46c18b947561f113f3ef8381c4d86821c2c1.tar.zst freebsd-ports-gnome-677c46c18b947561f113f3ef8381c4d86821c2c1.zip |
Use setenv to add an environment variable instead of putenv. In 7.0,
putenv() does not copy the supplied environment stringi, but gcc/gnat
was free()ing the memory expecting that it would be copied.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/gnat/files/patch-ab | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lang/gnat/files/patch-ab b/lang/gnat/files/patch-ab new file mode 100644 index 000000000000..ebc55349289b --- /dev/null +++ b/lang/gnat/files/patch-ab @@ -0,0 +1,20 @@ +--- gcc/ada/env.c.orig 2006-05-22 02:05:53.000000000 -0400 ++++ gcc/ada/env.c 2008-04-07 19:56:12.000000000 -0400 +@@ -166,7 +166,7 @@ + LIB$SIGNAL (status); + } + +-#elif defined (__vxworks) && defined (__RTP__) ++#elif defined (__FreeBSD__) || (defined (__vxworks) && defined (__RTP__)) + setenv (name, value, 1); + + #else +@@ -177,7 +177,7 @@ + + sprintf (expression, "%s=%s", name, value); + putenv (expression); +-#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__MINGW32__) \ ++#if defined (__APPLE__) || defined (__MINGW32__) \ + ||(defined (__vxworks) && ! defined (__RTP__)) + /* On some systems like FreeBSD, MacOS X and Windows, putenv is making + a copy of the expression string so we can free it after the call to |