- io.last_modified = 0;
- if (lmfile) {
- struct stat st;
- int rv;
- struct tm *mtime;
- time_t ts;
-
- rv = stat(lmfile, &st);
- if (rv == -1) {
- perror("stat failed:");
- exit(EXIT_FAILURE);
- }
- ts = st.st_mtime;
- io.last_modified = ts;
- mtime = gmtime(&ts);
- strftime(lmtime, sizeof lmtime, "%a, %d %b %Y %H:%M:%S GMT", mtime);
- }
-