#include #include #include const char *tvheadend_dataroot(void) { static char cwd[256] = { 0 }; if (!*cwd) { assert(getcwd(cwd, 254)); strcat(cwd, "/"); } printf("cwd = %s\n", cwd); return cwd; }