[mythtv] Building 0.21-fixes under Win32

Simon Tsai simon_tsai at yahoo.com
Mon Mar 23 18:40:45 UTC 2009


unistd.h is Linux include file not Windows include file.
Windows does not have usleep() function, it use Sleep(). Sleep unit is ms and usleep() unit is us (micro sec). 

You can try the following code:

#ifdef WIN32
Sleep(x/1000); //ms
else
usleep(x); //micro sec
#endif

Or you can define usleep for Windows.



--- On Mon, 3/23/09, Ray Parrish <rparrish at gmail.com> wrote:

> From: Ray Parrish <rparrish at gmail.com>
> Subject: [mythtv] Building 0.21-fixes under Win32
> To: mythtv-dev at mythtv.org
> Date: Monday, March 23, 2009, 9:04 AM
> Second try, this time with the correct subject line.
> 
> I am trying to build a 0.21-fixes frontend using the Perl
> script
> available in trunk with the -b switch.
> 
> The compilation continually fails at
> /mythtv/libs/libavformat/os_support.c with error
> "syntax error before
> '(' token" on line 36 of unistd.h. From what I
> have read in the
> archived threads, it has to do with defining usleep(). From
> my limited
> coding experience, I see that os_support.h has a line to
> define
> usleep, but that does not appear to be used. During the
> compile
> process, I kept seeing messages from lines in the Makefile
> that
> commands were being overridden. Perhaps that the Includes
> list was
> being forced to a different one from what's listed in
> the appropriate
> Makefile?
> 
> Most of the discussions I have read have to do with
> compiling trunk
> rather than -fixes. I have left the SVN revision for
> 0.21-fixes at the
> default from the script: 19910.
> 
> Which patches do I need to make to get 0.21-fixes to
> compile, and
> which revision of the code should I choose?
> 
> I am a new subscriber to this list. I don't usually
> read the -dev list
> because I don't run trunk. This posting is after
> several searches of
> the mailing list archives, and I am happy to supply any log
> info
> requested.
> 
> thank you all in advance,
> 
> -Ray
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


      


More information about the mythtv-dev mailing list