[MPlayer-dev-eng] osdep/gettimeofday.c gettimeofday() prototype

Diego Biurrun diego at biurrun.de
Thu Jan 6 13:15:46 CET 2011


I'm somewhat confused what the correct prototype for gettimeofday() is.

I stumbled across the following problem report where compilation of
osdep/gettimeofday.c is failing due to a conflicting prototype between
our implementation and the system header:
http://lists.mplayerhq.hu/pipermail/mplayerosx-devel/2010-December/000030.html

POSIX specifies the following prototype:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/gettimeofday.html
  int gettimeofday(struct timeval *restrict tp, void *restrict tzp);

while my Linux man page has the following:

  int gettimeofday(struct timeval *tv, struct timezone *tz);

which is the same as our local implementation.  What gives?

Diego


More information about the MPlayer-dev-eng mailing list