[FFmpeg-devel] Patch: libssh on Windows

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Dec 28 15:41:12 CET 2013


On Sat, Dec 28, 2013 at 03:32:08PM +0100, Lukasz M wrote:
> On 28 December 2013 15:26, Reimar Döffinger <Reimar.Doeffinger at gmx.de>wrote:
> 
> > On Sat, Dec 28, 2013 at 11:58:29AM +0000, Carl Eugen Hoyos wrote:
> > > Matt Oliver <protogonoi <at> gmail.com> writes:
> > >
> > > > This is just a quick patch to allow for libssh.c to
> > > > compile on any Windows platform. The Windows headers
> > > > dont define some of the standard read/write
> > > > permission flags (S_IRUSR etc.).
> > >
> > > I believe this belongs into libavformat/os_support.h
> >
> > They are already there (at the very least some).
> > Probably just a missing include.
> 
> 
> There are S_IRUSR S_IWUSR
> S_IRGRP, S_IWGRP, S_IROTH are missing
> 
> If it is ok I would add following to os_support,h and include it in libssh.c
> 
> # define S_IRGRP        (S_IRUSR >> 3)  /* Read by group.  */
> # define S_IWGRP        (S_IWUSR >> 3)  /* Write by group.  */
> # define S_IROTH        (S_IRGRP >> 3)  /* Read by others.  */

I am not sure this is correct, particularly on Windows.
I suspect that the correct thing would be to define them to 0 if they
are not defined (which is probably why they are currently not defined,
since they are a bit tricky to define in a way that makes sense on OSs
that do not have the UNIX ugo permission scheme).
Alternatively putting the code using them under ifdef would be another
option. Haven't checked which might make more sense.


More information about the ffmpeg-devel mailing list