[MPlayer-dev-eng] OpenBSD patch

Björn Sandell biorn at dce.chalmers.se
Thu Apr 25 16:30:15 CEST 2002


G'day,

On Thu, 25 Apr 2002, Arpi wrote:

> Hi,
> 
> > @@ -169,6 +172,9 @@.
> >  		ioctl(dvd, DVDIOCREPORTKEY, &ai);.
> >  	}.
> >  #else.
> > +#if defined(__OpenBSD__).
> > +        union.
> > +#endif.
> >          dvd_authinfo ai;.
> >          int i;.
> >          for (i = 0; i < 4; i++) {.
> 
> i don't understand this change

dvd_authinfo isn't typedef:d on OpenBSD
 
> > +#ifdef __OpenBSD__.
> > +#define ASMSYM "_".
> > +#else.
> > +#define ASMSYM.
> > +#endif.
> >  int dvd_auth ( char *dev , char *filename ).
> >  {.
> >      	DVDHandle dvd;  /* DVD device handle */.
> > @@ -223,12 +233,12 @@.
> >  fprintf(stderr,"DVD: %s\n  Hint: use libcss version 0.1!\n",dlerror());\.
> >  return 1; }.
> >  .
> > -	CSS_DLSYM(dl_CSSisEncrypted,"CSSisEncrypted");.
> > -	CSS_DLSYM(dl_CSSAuthDisc,"CSSAuthDisc");.
> > -	CSS_DLSYM(dl_CSSAuthTitle,"CSSAuthTitle");.
> > -	CSS_DLSYM(dl_CSSGetASF,"CSSGetASF");.
> > -	CSS_DLSYM(dl_CSSDecryptTitleKey,"CSSDecryptTitleKey");.
> > -	CSS_DLSYM(dl_CSSDescramble,"CSSDescramble");.
> > +	CSS_DLSYM(dl_CSSisEncrypted,ASMSYM"CSSisEncrypted");.
> > +	CSS_DLSYM(dl_CSSAuthDisc,ASMSYM"CSSAuthDisc");.
> > +	CSS_DLSYM(dl_CSSAuthTitle,ASMSYM"CSSAuthTitle");.
> > +	CSS_DLSYM(dl_CSSGetASF,ASMSYM"CSSGetASF");.
> > +	CSS_DLSYM(dl_CSSDecryptTitleKey,ASMSYM"CSSDecryptTitleKey");.
> > +	CSS_DLSYM(dl_CSSDescramble,ASMSYM"CSSDescramble");.
> 
> is this the best solution?

Probably not... ;-)

> imho libdl.so should handle the '_' problems, shouldn't?

I think it has been suggested on mailinglists, but so far to no avail. One
of these days they we change to elf format...

> or at least the CSS_DLSYM() macro

I'll take a look at it.

> >  #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__).
> > +#include <machine/segments.h>.
> >  #include <machine/sysarch.h>.
> >  #endif.
> 
> does this machine/segments.h exists (and required) on all BSD ?

According to their on-line manpages, yes.

Björn Sandell       DCE/DFS Sysadmin       IT department
Chalmers University of Technology    www.dce.chalmers.se




More information about the MPlayer-dev-eng mailing list