#52 dvconnect needs additional include for _IOWR on solaris

open
nobody
None
5
2011-12-28
2011-12-28
Tim Mooney
No

Building libdv-1.0.0 on x86_64-sun-solaris2.10 (not OpenSolaris) with the no-cost Sun/Oracle Workshop 12.2 compiler toolchain.

When building dvconnect.c I get a compile failure because _IOWR is not defined:

"dvconnect.c", line 373: warning: implicit function declaration: _IOWR
"dvconnect.c", line 373: syntax error before or at: struct
"dvconnect.c", line 378: syntax error before or at: if
"dvconnect.c", line 378: syntax error before or at: =
"dvconnect.c", line 378: syntax error before or at: )
"dvconnect.c", line 380: syntax error before or at: 0

and so on.

dvconnect.c is including sys/ioctl.h, but the problem is that on Solaris, the _IOWR macro and friends are not defined in sys/ioctl.h. They're actually defined in sys/ioccom.h, but it appears that the best way to get them is to include sys/filio.h. In fact, sys/ioctl.h would include sys/filio.h, but only if the BSD-backwards compatibility -DBSD_COMP define is present, and there are warnings in sys/ioctl.h about unpleasant side-effects from that define.

Long story short, it appears the best way to get _IOWR on Solaris is to include sys/filio.h.

Do you want a patch that does something like

#ifdef (__sun)
#include <sys/filio.h>
#endif

or would you prefer an

AC_CHECK_HEADER([sys/filio.h])

and a

#if HAVE_SYS_FILIO_H
#include <sys/filio.h>
#endif

? Seems like the second one is better and might help out other odd duck platforms, but I'll code up whichever you want and supply a patch.

Discussion

  • Dan Dennedy

    Dan Dennedy - 2011-12-29

    No one is maintaining libdv anymore. Fork it and patch as needed.

     
  • Nobody/Anonymous

    Hello there! This post could not be written any better! Reading through this post reminds me of my old room mate! He always kept chatting about this. I will forward this write-up to him. Fairly certain he will have a good read. Thank you for sharing!
    north face jackets sale http://www.aktnedmwge.350.com/

     
  • Nobody/Anonymous

    LtZVZz <a href="http://eknguubsbcvb.com/">eknguubsbcvb</a>, [url=http://qvsoduuphwqw.com/]qvsoduuphwqw[/url], [link=http://zywhgtjbtqal.com/]zywhgtjbtqal[/link], http://mxtgrtdcbfpo.com/

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks