[MPlayer-users] MPlayer-0.90pre6 compilation problems

Gansser, Martin MGansser at rand.de
Wed Aug 7 17:36:02 CEST 2002


> -----Original Message-----
> From: Gábor Lénárt [mailto:lgb at lgb.hu]
> Sent: Wednesday, August 07, 2002 2:26 PM
> To: mplayer-users at mplayerhq.hu
> Subject: Re: [MPlayer-users] MPlayer-0.90pre6 compilation problems
> 
> 
> [Automatic answer: RTFM (read DOCS, FAQ), also read 
> DOCS/bugreports.html]
> On Wed, Aug 07, 2002 at 01:51:10PM +0200, Gansser, Martin wrote:
> > collect2: ld returned 1 exit status
> > gmake: *** [mplayer] Error 1
> > 
> > prounix_root:/users/mgansser/GNU/MPlayer-0.90pre6 #
> > 
> > any help ?
> 
> Yes. Try to find out the location of setenv() [ie: which 
> library contains it]
> Or just see libvo/vo_sdl.c:
> 
> #if     defined(sun) && defined(__svr4__)
> /* setenv is missing on solaris */
> static void setenv(const char *name, const char *val, int _xx)
> {
>     int len  = strlen(name) + strlen(val) + 2;
>     char *env = malloc(len);
> 
>     if (env != NULL) {
>         strcpy(env, name);
>         strcat(env, "=");
>         strcat(env, val);
>         putenv(env);
>     }
> }
> #endif
> 
> You only need to add HPUX, since it seems HPUX does not know 
> setenv() either ...

I added this to libvo/vo_sdl.c and libao2/ao_sdl.c:

#if     defined(HPUX)
/* setenv is missing on HPUX */
static void setenv(const char *name, const char *val, int _xx)
{
    int len  = strlen(name) + strlen(val) + 2;
    char *env = malloc(len);

    if (env != NULL) {
        strcpy(env, name);
        strcat(env, "=");
        strcat(env, val);
        putenv(env);
    }
}
#endif

and set CFLAGS= -DHPUX, MPlayer compiles now.


thanks Martin




More information about the MPlayer-users mailing list