[Ffmpeg-devel] Network patch for MingW users

Alex Beregszaszi alex
Sat Feb 24 14:43:30 CET 2007


Hi,
  
> > +/**
> > + * sets the non-blocking io on socket
> > + */
> > +static inline int av_socket_nonblock(int socket, int enable)
> > +{
> > +#ifdef __MINGW32__
> > +   return ioctlsocket(socket, FIONBIO, &enable);
> > +#else
> > +   if (enable)
> > +      return fcntl(socket, F_SETFL, fcntl(socket, F_GETFL) | O_NONBLOCK);
> > +   else
> > +      return fcntl(socket, F_SETFL, fcntl(socket, F_GETFL) & ~O_NONBLOCK);
> >  #endif
> > +}
> 
> This should be in os_support.c with a prototype here.

Also I would leave it here as it is a oneliner inline. 

--
Alex Beregszaszi






More information about the ffmpeg-devel mailing list