[vlc-commits] Dash: fix win32 compilation

Jean-Baptiste Kempf git at videolan.org
Fri Dec 30 18:55:43 CET 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Dec 30 18:54:41 2011 +0100| [2d31fd776f7717da77193d6a893b0d93c68f689b] | committer: Jean-Baptiste Kempf

Dash: fix win32 compilation

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2d31fd776f7717da77193d6a893b0d93c68f689b
---

 configure.ac                                     |    2 +-
 modules/stream_filter/dash/mpd/BasicCMParser.cpp |    2 ++
 modules/stream_filter/dash/mpd/SegmentTimeline.h |    1 +
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index a3176c1..f895caf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -475,7 +475,7 @@ need_libc=false
 
 dnl Check for usual libc functions
 AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
-AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r if_nameindex if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp uselocale])
+AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r if_nameindex if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale])
 AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r inet_pton lldiv localtime_r nrand48 rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy])
 AC_CHECK_FUNCS(fdatasync,,
   [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
diff --git a/modules/stream_filter/dash/mpd/BasicCMParser.cpp b/modules/stream_filter/dash/mpd/BasicCMParser.cpp
index d72334b..8ded464 100644
--- a/modules/stream_filter/dash/mpd/BasicCMParser.cpp
+++ b/modules/stream_filter/dash/mpd/BasicCMParser.cpp
@@ -81,6 +81,7 @@ bool    BasicCMParser::setMPD()
                      " the stream @type is Live" << std::endl;
         return false;
     }
+#ifdef HAVE_STRPTIME
     if ( it != attr.end() )
     {
         struct tm   t;
@@ -105,6 +106,7 @@ bool    BasicCMParser::setMPD()
         if ( res != NULL )
             this->mpd->setAvailabilityEndTime( mktime( &t ) );
     }
+#endif
     it = attr.find( "mediaPresentationDuration" );
     if ( it != attr.end() )
         this->mpd->setDuration( str_duration( it->second.c_str() ) );
diff --git a/modules/stream_filter/dash/mpd/SegmentTimeline.h b/modules/stream_filter/dash/mpd/SegmentTimeline.h
index f4df859..efc5db7 100644
--- a/modules/stream_filter/dash/mpd/SegmentTimeline.h
+++ b/modules/stream_filter/dash/mpd/SegmentTimeline.h
@@ -26,6 +26,7 @@
 
 #include <sys/types.h>
 #include <list>
+#include <stdint.h>
 
 namespace dash
 {



More information about the vlc-commits mailing list