summaryrefslogtreecommitdiffstats
path: root/mpeglib/example/yaf/yafcore/inputInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mpeglib/example/yaf/yafcore/inputInterface.cpp')
-rw-r--r--mpeglib/example/yaf/yafcore/inputInterface.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/mpeglib/example/yaf/yafcore/inputInterface.cpp b/mpeglib/example/yaf/yafcore/inputInterface.cpp
index 455ddd40..c5beaeda 100644
--- a/mpeglib/example/yaf/yafcore/inputInterface.cpp
+++ b/mpeglib/example/yaf/yafcore/inputInterface.cpp
@@ -75,7 +75,11 @@ int InputInterface::write(int fd,const char* txt) {
snprintf(loopback->getData(),300,
"Command:41 Msg:%s",txt);
} else {
+#if defined(HAVE_STRLCPY) || defined(HAVE_STRLCPY_PROTO)
strlcpy(loopback->getData(),txt, loopback->getSize());
+#else
+ strncpy(loopback->getData(),txt, loopback->getSize());
+#endif
}
len =loopback->len();
back=::write(fd,loopback->getData(),len);
@@ -136,7 +140,11 @@ void InputInterface::makeValidLine(char* line) {
"Command:%d Msg:%s",currentCommandNumber,line);
} else {
increaseCurrentCommandNumber();
+#if defined(HAVE_STRLCPY) || defined(HAVE_STRLCPY_PROTO)
strlcpy(currentLine->getData(),line, currentLine->getSize());
+#else
+ strncpy(currentLine->getData(),line, currentLine->getSize());
+#endif
}
return;