<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 52: dvconnect needs additional include for _IOWR on solaris</title><link>https://sourceforge.net/p/libdv/bugs/52/</link><description>Recent changes to 52: dvconnect needs additional include for _IOWR on solaris</description><atom:link href="https://sourceforge.net/p/libdv/bugs/52/feed.rss" rel="self"/><language>en</language><lastBuildDate>Wed, 28 Dec 2011 23:18:53 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/libdv/bugs/52/feed.rss" rel="self" type="application/rss+xml"/><item><title>dvconnect needs additional include for _IOWR on solaris</title><link>https://sourceforge.net/p/libdv/bugs/52/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Building libdv-1.0.0 on x86_64-sun-solaris2.10 (not OpenSolaris) with the no-cost Sun/Oracle Workshop 12.2 compiler toolchain.&lt;/p&gt;
&lt;p&gt;When building dvconnect.c I get a compile failure because _IOWR is not defined:&lt;/p&gt;
&lt;p&gt;"dvconnect.c", line 373: warning: implicit function declaration: _IOWR&lt;br /&gt;
"dvconnect.c", line 373: syntax error before or at: struct&lt;br /&gt;
"dvconnect.c", line 378: syntax error before or at: if&lt;br /&gt;
"dvconnect.c", line 378: syntax error before or at: =&lt;br /&gt;
"dvconnect.c", line 378: syntax error before or at: )&lt;br /&gt;
"dvconnect.c", line 380: syntax error before or at: 0&lt;/p&gt;
&lt;p&gt;and so on.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Long story short, it appears the best way to get _IOWR on Solaris is to include sys/filio.h.&lt;/p&gt;
&lt;p&gt;Do you want a patch that does something like&lt;/p&gt;
&lt;p&gt;#ifdef (__sun)&lt;br /&gt;
#include &amp;lt;sys/filio.h&amp;gt;&lt;br /&gt;
#endif&lt;/p&gt;
&lt;p&gt;or would you prefer an&lt;/p&gt;
&lt;p&gt;AC_CHECK_HEADER([sys/filio.h])&lt;/p&gt;
&lt;p&gt;and a&lt;/p&gt;
&lt;p&gt;#if HAVE_SYS_FILIO_H&lt;br /&gt;
#include &amp;lt;sys/filio.h&amp;gt;&lt;br /&gt;
#endif&lt;/p&gt;
&lt;p&gt;?  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.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Mooney</dc:creator><pubDate>Wed, 28 Dec 2011 23:18:53 -0000</pubDate><guid>https://sourceforge.net869c751f431e15be36f84868d53aaab7966a2b62</guid></item></channel></rss>