# HG changeset patch # User al # Date 1329523710 0 # Node ID 0bce77ccae9a55e8e956ebc74f0ebd211dd1bfbf # Parent 3ed6c81c8deed570aa044a74da3045a2fad34246 Fix compiling with osdep setenv Since we have -Werror-implicit-function-declaration in CFLAGS, we need a prototype for the osdep setenv() implementation. Reported-by: redxii (in #mplayer IRC channel) diff -r 3ed6c81c8dee -r 0bce77ccae9a libao2/ao_sdl.c --- a/libao2/ao_sdl.c Fri Feb 17 20:07:21 2012 +0000 +++ b/libao2/ao_sdl.c Sat Feb 18 00:08:30 2012 +0000 @@ -37,6 +37,7 @@ #include #endif #include "osdep/timer.h" +#include "osdep/setenv.h" #include "libavutil/fifo.h" diff -r 3ed6c81c8dee -r 0bce77ccae9a libvo/sdl_common.c --- a/libvo/sdl_common.c Fri Feb 17 20:07:21 2012 +0000 +++ b/libvo/sdl_common.c Sat Feb 18 00:08:30 2012 +0000 @@ -22,6 +22,7 @@ #include "mp_msg.h" #include "mp_fifo.h" #include "osdep/keycodes.h" +#include "osdep/setenv.h" #include "input/input.h" #include "input/mouse.h" #include "video_out.h" diff -r 3ed6c81c8dee -r 0bce77ccae9a libvo/vo_sdl.c --- a/libvo/vo_sdl.c Fri Feb 17 20:07:21 2012 +0000 +++ b/libvo/vo_sdl.c Sat Feb 18 00:08:30 2012 +0000 @@ -67,6 +67,7 @@ #include "sub/sub.h" #include "aspect.h" #include "libmpcodecs/vfcap.h" +#include "osdep/setenv.h" #ifdef CONFIG_X11 #include diff -r 3ed6c81c8dee -r 0bce77ccae9a osdep/setenv.c --- a/osdep/setenv.c Fri Feb 17 20:07:21 2012 +0000 +++ b/osdep/setenv.c Sat Feb 18 00:08:30 2012 +0000 @@ -27,6 +27,8 @@ #endif #include +#include "setenv.h" + int setenv(const char *name, const char *val, int overwrite) { int len = strlen(name) + strlen(val) + 2; diff -r 3ed6c81c8dee -r 0bce77ccae9a osdep/setenv.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/osdep/setenv.h Sat Feb 18 00:08:30 2012 +0000 @@ -0,0 +1,28 @@ +/* + * This file is part of MPlayer. + * + * MPlayer is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * MPlayer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef MPLAYER_SETENV_H +#define MPLAYER_SETENV_H + +#include "config.h" + +#if !HAVE_SETENV +int setenv(const char *name, const char *val, int overwrite); +#endif + +#endif /* MPLAYER_SETENV_H */