Mingw does not have strnlen
Change-Id: I686df6a00fe0bf8d0e41cfc902b2a43633468ed8
Signed-off-by: ho.namkoong <ho.namkoong@samsung.com>
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
+#include <stdio.h>
#include "log.h"
#include "listener.h"
if(s == NULL) {
return NULL;
}
- int len = strnlen(s, PATH_MAX);
+ int len = s_strnlen(s, PATH_MAX);
int i = len - 1;
for(; i>-1; i--) {
if(s[i] == chr) {
void rtrim(char* s) {
- int len = strnlen(s, PATH_MAX) - 1;
+ int len = s_strnlen(s, PATH_MAX) - 1;
char* t = s + len;
for(; len > -1; len--) {