]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd: add missing include <time.h>
authorClément Chigot <chigot@adacore.com>
Wed, 13 Mar 2024 10:05:01 +0000 (11:05 +0100)
committerClément Chigot <chigot@adacore.com>
Mon, 18 Mar 2024 11:53:42 +0000 (12:53 +0100)
bdfio.c is defining bfd_get_current_time which is returning a time_t.
This type is defined in time.h and thus, must be included in bfd main
header to avoid undefined type when include bfd.h.

Note that most of the time, <time.h> is pulled by <sys/stat.h> already
included in bfd.h. That's why it went unnoticed.

bfd/bfd-in.h
bfd/bfd-in2.h

index 0ff1e2f3ed53570b212dad5e1fc8a5b19e0fbab9..04e65aad5f0c235a5013513c545e57a01e96541f 100644 (file)
@@ -36,6 +36,7 @@ extern "C" {
 #include "symcat.h"
 #include <stdint.h>
 #include <stdbool.h>
+#include <time.h>
 #include "diagnostics.h"
 #include <stdarg.h>
 #include <string.h>
index 29602e054da2d4219324484b7bd8c7f3a125fa8e..fa28688837c780474f75a52a917f0865762174a7 100644 (file)
@@ -44,6 +44,7 @@ extern "C" {
 #include "symcat.h"
 #include <stdint.h>
 #include <stdbool.h>
+#include <time.h>
 #include "diagnostics.h"
 #include <stdarg.h>
 #include <string.h>