diff options
Diffstat (limited to 'recipes-graphics/wayland/weston/0004-MGS-1235-Fix-setenv-and-clear-environments.patch')
| -rw-r--r-- | recipes-graphics/wayland/weston/0004-MGS-1235-Fix-setenv-and-clear-environments.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston/0004-MGS-1235-Fix-setenv-and-clear-environments.patch b/recipes-graphics/wayland/weston/0004-MGS-1235-Fix-setenv-and-clear-environments.patch new file mode 100644 index 000000000..e4f8cd9c3 --- /dev/null +++ b/recipes-graphics/wayland/weston/0004-MGS-1235-Fix-setenv-and-clear-environments.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From d09d0595b472d6bae35e78272fc670d494f6e408 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Prabhu <prabhu.sundararaj@freescale.com> | ||
| 3 | Date: Tue, 17 Nov 2015 22:00:42 -0600 | ||
| 4 | Subject: [PATCH] MGS-1235 : Fix setenv and clear environments | ||
| 5 | |||
| 6 | When setenv is set with parameter null causing crash. | ||
| 7 | Fixed with unsetenv to restore to previous state | ||
| 8 | |||
| 9 | Date: Nov 17, 2015 | ||
| 10 | Signed-off-by: Prabhu <prabhu.sundararaj@freescale.com> | ||
| 11 | |||
| 12 | -1235 | ||
| 13 | --- | ||
| 14 | src/compositor-fbdev.c | 11 ++++++++++- | ||
| 15 | 1 file changed, 10 insertions(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c | ||
| 18 | index ed25576..c6b8e5a 100644 | ||
| 19 | --- a/src/compositor-fbdev.c | ||
| 20 | +++ b/src/compositor-fbdev.c | ||
| 21 | @@ -598,7 +598,16 @@ fbdev_output_create(struct fbdev_backend *backend, | ||
| 22 | fprintf(stderr, "failed to create window\n"); | ||
| 23 | return 0; | ||
| 24 | } | ||
| 25 | - setenv("FB_FRAMEBUFFER_0", fbenv, 1); | ||
| 26 | + /* restore the previous value*/ | ||
| 27 | + if(fbenv != NULL) | ||
| 28 | + { | ||
| 29 | + setenv("FB_FRAMEBUFFER_0", fbenv, 1); | ||
| 30 | + } | ||
| 31 | + else | ||
| 32 | + { | ||
| 33 | + unsetenv("FB_FRAMEBUFFER_0"); | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | |||
| 37 | if (gal2d_renderer->output_create(&output->base, | ||
| 38 | output->display, | ||
| 39 | -- | ||
| 40 | 2.5.1 | ||
| 41 | |||
