Commit: Add prototypes for unused inlines in rename.c

Message ID 87czuqfz0w.fsf@redhat.com
State New
Headers show
Series
  • Commit: Add prototypes for unused inlines in rename.c
Related show

Commit Message

Roland McGrath via Binutils April 19, 2021, 8:40 a.m.
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.

Patch

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)