shithub: openh264

Download patch

ref: b939d91517c8c57bde8717bc13ecf20bfbc10295
parent: 47e8134b928f5b9aefe757d2c4df074587751330
author: V <h_o_w_@hotmail.com>
date: Mon Dec 23 17:03:41 EST 2013

Add workaround for missing strnlen.

Enabled by default, define HAVE_STRNLEN to disable workaround.

--- a/codec/decoder/core/src/utils.cpp
+++ b/codec/decoder/core/src/utils.cpp
@@ -48,11 +48,14 @@
 #include <sys/timeb.h>
 #ifndef _MSC_VER
 #include <sys/time.h>
-#endif
+#ifndef HAVE_STRNLEN
+#define strnlen(a,b) strlen(a)
+#endif //!HAVE_STRNLEN
+#endif //!_MSC_VER
 #else
 #include <sys/time.h>
 #include <sys/timeb.h>
-#endif
+#endif //_WIN32
 
 #include "utils.h"
 #include "macros.h"