<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/9251">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_oss: Compile in Solaris 11.<br><br>M_READ existed already and was conflicting in name.<br><br>Change-Id: I02108e07ae7d2dc314fe1e6c706c17731095a3e4<br>---<br>M channels/chan_oss.c<br>1 file changed, 12 insertions(+), 7 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/51/9251/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/chan_oss.c b/channels/chan_oss.c<br>index 4c0bd42..c71dbf8 100644<br>--- a/channels/chan_oss.c<br>+++ b/channels/chan_oss.c<br>@@ -257,7 +257,12 @@<br> char *name;<br> int total_blocks; /*!< total blocks in the output device */<br> int sounddev;<br>- enum { M_UNSET, M_FULL, M_READ, M_WRITE } duplex;<br>+ enum {<br>+ CHAN_OSS_DUPLEX_UNSET,<br>+ CHAN_OSS_DUPLEX_FULL,<br>+ CHAN_OSS_DUPLEX_READ,<br>+ CHAN_OSS_DUPLEX_WRITE<br>+ } duplex;<br> int autoanswer; /*!< Boolean: whether to answer the immediately upon calling */<br> int autohangup; /*!< Boolean: whether to hangup the call when the remote end hangs up */<br> int hookstate; /*!< Boolean: 1 if offhook; 0 if onhook */<br>@@ -320,7 +325,7 @@<br> }<br> static struct chan_oss_pvt oss_default = {<br> .sounddev = -1,<br>- .duplex = M_UNSET, /* XXX check this */<br>+ .duplex = CHAN_OSS_DUPLEX_UNSET, /* XXX check this */<br> .autoanswer = 1,<br> .autohangup = 1,<br> .queuesize = QUEUE_SIZE,<br>@@ -482,7 +487,7 @@<br> if (o->sounddev >= 0) {<br> ioctl(o->sounddev, SNDCTL_DSP_RESET, 0);<br> close(o->sounddev);<br>- o->duplex = M_UNSET;<br>+ o->duplex = CHAN_OSS_DUPLEX_UNSET;<br> o->sounddev = -1;<br> }<br> if (mode == O_CLOSE) /* we are done */<br>@@ -515,16 +520,16 @@<br> res = ioctl(fd, SNDCTL_DSP_GETCAPS, &fmt);<br> if (res == 0 && (fmt & DSP_CAP_DUPLEX)) {<br> ast_verb(2, "Console is full duplex\n");<br>- o->duplex = M_FULL;<br>+ o->duplex = CHAN_OSS_DUPLEX_FULL;<br> };<br> break;<br> <br> case O_WRONLY:<br>- o->duplex = M_WRITE;<br>+ o->duplex = CHAN_OSS_DUPLEX_WRITE;<br> break;<br> <br> case O_RDONLY:<br>- o->duplex = M_READ;<br>+ o->duplex = CHAN_OSS_DUPLEX_READ;<br> break;<br> }<br> <br>@@ -1418,7 +1423,7 @@<br> ast_verb(1, "Turn off OSS support by adding " "'noload=chan_oss.so' in /etc/asterisk/modules.conf\n");<br> goto error;<br> }<br>- if (o->duplex != M_FULL)<br>+ if (o->duplex != CHAN_OSS_DUPLEX_FULL)<br> ast_log(LOG_WARNING, "XXX I don't work right with non " "full-duplex sound cards XXX\n");<br> #endif /* TRYOPEN */<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9251">change 9251</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/9251"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I02108e07ae7d2dc314fe1e6c706c17731095a3e4 </div>
<div style="display:none"> Gerrit-Change-Number: 9251 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>