Commit: Add prototypes for unused inlines in rename.c
Nick Clifton
nickc@redhat.com
Mon Apr 19 08:40:15 GMT 2021
Hi Guys,
I ran across a compile time error building the binutils with Clang.
It turns out that under some circumstances the get_stat_*time_ns()
functions in binutils/rename.c are not used, and this triggers an
error message. So I am applying the small patch below to fix the
problem.
Cheers
Nick
binutils/ChangeLog
2021-04-19 Nick Clifton <nickc@redhat.com>
* rename.c: (get_stat_atime_ns): Add prototype.
* rename.c: (get_stat_mtime_ns): Add prototype.
diff --git a/binutils/rename.c b/binutils/rename.c
index 544225d73f7..8826917c18c 100644
--- a/binutils/rename.c
+++ b/binutils/rename.c
@@ -102,6 +102,9 @@ simple_copy (int fromfd, const char *to,
# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec)
#endif
+static inline long int get_stat_atime_ns (struct stat const *) ATTRIBUTE_UNUSED;
+static inline long int get_stat_mtime_ns (struct stat const *) ATTRIBUTE_UNUSED;
+
/* Return the nanosecond component of *ST's access time. */
static inline long int
get_stat_atime_ns (struct stat const *st ATTRIBUTE_UNUSED)
More information about the Binutils
mailing list