From 8b12682035e2ae92a29a9ce12abc5fbcf38b1192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 26 Mar 2017 15:58:46 +0200 Subject: Initial cmake conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- mpeglib/example/yaf/yafcore/inputInterface.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mpeglib/example/yaf/yafcore/inputInterface.cpp') 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; -- cgit v1.2.1