diff options
author | Rodeo <[email protected]> | 2015-01-28 22:59:07 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2015-01-28 22:59:07 +0000 |
commit | 1088f1d85df3d987e295974c44a98f7162ce8fca (patch) | |
tree | 1f7c3ee7f4ede1ecee576956ead3bc000949719c /libhb/ports.h | |
parent | d8eecdc928c9ef8f74ebb4241658f20c77fae47a (diff) |
Build: fix compilation with some MinGW-w64 distributions.
Some distributions provide their own strtok_r via a preprocessor directive, which conflicts with our implementation; prefer our own as it is thread-safe.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6825 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/ports.h')
-rw-r--r-- | libhb/ports.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libhb/ports.h b/libhb/ports.h index 771a233a7..c9ce48d16 100644 --- a/libhb/ports.h +++ b/libhb/ports.h @@ -49,7 +49,15 @@ uint64_t hb_get_time_us(); void hb_snooze( int delay ); int hb_platform_init(); + #ifdef SYS_MINGW +/* + * Some MinGW distributions #define strtok_r in pthread.h, + * but their so-called "implementation" isn't thread-safe. + */ +#ifdef strtok_r +#undef strtok_r +#endif char *strtok_r(char *s, const char *delim, char **save_ptr); #endif |