SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE -Wno-deprecated-declarations")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
CONFIGURE_FILE(crash-manager.h.in crash-manager.h @ONLY)
ADD_EXECUTABLE(${PROJECT_NAME} ${CRASH_MANAGER_SRCS})
{
int threadnum=1;
DIR *dir;
- struct dirent entry;
struct dirent *dentry=NULL;
char task_path[PATH_MAX];
struct stat sb;
if (!dir) {
fprintf(errfile, "[crash-stack] cannot open %s\n", task_path);
} else {
- while (readdir_r(dir, &entry, &dentry) == 0 && dentry) {
+ while ((dentry = readdir(dir))) {
if (strcmp(dentry->d_name, ".") == 0 ||
strcmp(dentry->d_name, "..") == 0)
continue;
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -fno-omit-frame-pointer -finstrument-functions")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE -Wno-deprecated-declarations")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
MESSAGE("FLAGS: ${CMAKE_C_FLAGS}")
ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE -Wno-deprecated-declarations")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
CONFIGURE_FILE(log_dump.h.in log_dump.h @ONLY)
ADD_EXECUTABLE(${PROJECT_NAME} ${LOG_DUMP_SRCS})
static int remove_dir_internal(int fd)
{
DIR *dir;
- struct dirent e;
struct dirent *de;
int subfd, ret = 0;
if (!dir)
return -1;
- while ((ret = readdir_r(dir, &e, &de)) == 0 && de) {
+ while ((de = readdir(dir))) {
if (de->d_type == DT_DIR) {
if (!strncmp(de->d_name, ".", 2) || !strncmp(de->d_name, "..", 3))
continue;
int get_exec_pid(const char *execpath)
{
DIR *dp;
- struct dirent entry;
struct dirent *dentry;
int pid = -1, fd;
int ret;
}
len = strlen(execpath) + 1;
- if ((readdir_r(dp, &entry, &dentry)) != 0)
- dentry = NULL;
- while (dentry != NULL) {
+ while ((dentry = readdir(dp))) {
if (!isdigit(dentry->d_name[0]))
continue;
int get_file_count(char *path)
{
DIR *dir;
- struct dirent p;
struct dirent *dp;
int count = 0;
if (!dir)
return 0;
- if ((readdir_r(dir, &p, &dp)) != 0)
- dp = NULL;
-
- while (dp != NULL) {
+ while ((dp = readdir(dir))) {
const char *name = dp->d_name;
/* always skip "." and ".." */
if (name[0] == '.') {
int get_directory_usage(char *path)
{
DIR *dir;
- struct dirent e;
struct dirent *de;
struct stat st;
size_t usage = 0;
int fd = -1;
- int ret;
fd = open(path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME);
if (fd < 0)
return -1;
}
- while ((ret = readdir_r(dir, &e, &de)) == 0 && de) {
+ while ((de = readdir(dir))) {
if (!strncmp(de->d_name, ".", 2) || !strncmp(de->d_name, "..", 3))
continue;
if (fstatat(fd, de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) {
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
SET(CMAKE_C_FLAGS_RELEASE "-O2")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
-
FIND_PROGRAM(UNAME NAMES uname)
EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
IF("${ARCH}" STREQUAL "arm")
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/tizen-debug-off.service DESTINATION /usr/lib/systemd/system
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
- GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
\ No newline at end of file
pid_t pid;
pid_t tid;
DIR *dir;
- struct dirent entry;
struct dirent *dentry=NULL;
char timestr[TIME_MAX_LEN];
char processname[NAME_MAX] = {0,};
if (!dir) {
fprintf(stderr, "[sys-assert]can't open %s\n", TASK_PATH);
} else {
- while (readdir_r(dir, &entry, &dentry) == 0 && dentry) {
+ while ((dentry = readdir(dir))) {
if (strcmp(dentry->d_name, ".") == 0
|| strcmp(dentry->d_name, "..") == 0)
continue;