Fixed build error on gcc62
[platform/core/connectivity/net-config.git] / src / wifi-config.c
index 1f479a3..41297d5 100755 (executable)
@@ -543,7 +543,6 @@ static gboolean _get_field(const gchar *config_id, const gchar *key, gchar **val
 static GSList *_get_list(void)
 {
        GSList *list = NULL;
-       struct dirent de;
        struct dirent *dp = NULL;
        DIR *dir;
 
@@ -553,7 +552,7 @@ static GSList *_get_list(void)
                return NULL;
        }
 
-       while ((readdir_r(dir, &de, &dp) == 0) && (dp != NULL)) {
+       while ((readdir(dir) == 0) && (dp != NULL)) {
                if (g_strcmp0(dp->d_name, ".") == 0 || g_strcmp0(dp->d_name, "..") == 0 ||
                                strncmp(dp->d_name, WIFI_CONFIG_PREFIX, strlen(WIFI_CONFIG_PREFIX)) != 0) {
                        continue;