Compare directory entries (sort by access date)
One declaration per line, please.

char File[SavesLen+Len[FirstLen &gt; SecondLen]+2]; is extremely hard to read. In fact, I suspect that there is a bug. Correct me if I am wrong, an intention is to allocate enough memory to accomodate the longest pathname. Now, if FirstLen is indeed greater than SecondLen, the condition evaluates to true, which is in this context is 1. Now the VLA size becomes SaveLen + Len[1] + 2, that is SaveLen + SecondLen + 2, which is not enough for the longer first name.

The loop running just two iterations is better be two calls to a function. Consider
  static time_t get_atime(const char * filename) {
      char path[SavesLen + 1 + strlen(filename) + 1];
      sprintf(path, &quot;%s/%s&quot;, S, filename);

      struct stat stat; 
      stat(path, &amp;stat);
      return stat.st_atimespec.tv_sec;
  }

  static int Q(const struct dirent **const First, const struct dirent **const Second) {
      time_t time0 = get_atime((*First)-&gt;d_name);
      time_t time1 = get_atime((*Second)-&gt;d_name);
      return time1 - time0;
  }


Of course, Q is not a name for a function. compare_atime perhaps?