On Monday, July 20, 2015, Sebastian Lackner <<a href="mailto:sebastian@fds-team.de">sebastian@fds-team.de</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 17.07.2015 18:29, Bruno Jesus wrote:<br>
> Try to apply Matteo's idea to not redefine the struct when port.h was<br>
> already included. I can't test in mingw myself unfortunately.<br>
<br>
I don't think this will work properly. The Linux pollfd struct contains "fd" with<br>
type "int", but on Windows its defined as "SOCKET" (which has size of a pointer).<br>
My personal preference would be to just leave out the "struct pollfd" definition<br>
here, and only declare WSAPOLLFD. Basically:<br>
<br>
+typedef struct<br>
+{<br>
+    SOCKET fd;<br>
+    SHORT events;<br>
+    SHORT revents;<br>
+} WSAPOLLFD;<br>
<br>
Not sure if this would be an acceptable solution for the other devs though.<br>
<br>
</blockquote><div><br></div><div>Sounds perfect to me, thanks. Will resend soon. </div>