dumpscan: Include time.h

Various parts of dumpscan use ctime(), time(), etc, but don't include
time.h. This causes errors on AIX when using the clang-based xlc 17.1,
such as:

    .../src/tools/dumpscan/parsevol.c:286:35: error: call to undeclared function 'ctime'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                printf("%s%s", field->label, ctime(&when));
                                             ^

Include time.h in these files, so we have declarations for these
functions.

Change-Id: I0247a55952640585ff3b27d2b0e47e09dea531a0
Reviewed-on: https://gerrit.openafs.org/15435
Reviewed-by: Ben Huntsman <ben@huntsmans.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
This commit is contained in:
Andrew Deason 2023-05-08 16:25:15 -05:00 committed by Michael Meffie
parent a80e32ff63
commit a7f77245b7
6 changed files with 8 additions and 0 deletions

View File

@ -29,6 +29,7 @@
/* backuphdr.c - Parse and print backup system headers */
#include <stdlib.h>
#include <time.h>
#include "dumpscan.h"
#include "dumpscan_errs.h"

View File

@ -28,6 +28,8 @@
/* dump.c - Write out parts of a volume dump */
#include <time.h>
#include "dumpscan.h"
#include "dumpfmt.h"

View File

@ -76,6 +76,7 @@
#include <fnmatch.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <time.h>
#include <rx/rx_queue.h>
#include <lock.h>

View File

@ -31,6 +31,7 @@
#include <sys/types.h>
#include <netinet/in.h>
#include <errno.h>
#include <time.h>
#include "dumpscan.h"
#include "dumpscan_errs.h"

View File

@ -28,6 +28,8 @@
/* parsevol.c - Parse a volume header */
#include <time.h>
#include "dumpscan.h"
#include "dumpscan_errs.h"
#include "dumpfmt.h"

View File

@ -33,6 +33,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <time.h>
#include "dumpscan.h"
#include "dumpscan_errs.h"