From: Collin Funk <collin.funk1@gmail.com>
Date: Sun, 23 Mar 2025 23:36:26 +0000 (-0700)
Subject: utimens: Fix missing declarations on NetBSD (regr. 2024-09-16).
X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=bba8fe374600c4e42db31ca82775cb46c77d55f9;p=gnulib.git

utimens: Fix missing declarations on NetBSD (regr. 2024-09-16).

* lib/utimens.h [HAVE_UTIMENS || HAVE_LUTIMENS]: Include <sys/stat.h>
instead of <sys/time.h> for the declarations of these functions on
NetBSD.
---

diff --git a/ChangeLog b/ChangeLog
index e0a18ebd25..b6a0671147 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-03-23  Collin Funk  <collin.funk1@gmail.com>
+
+	utimens: Fix missing declarations on NetBSD (regr. 2024-09-16).
+	* lib/utimens.h [HAVE_UTIMENS || HAVE_LUTIMENS]: Include <sys/stat.h>
+	instead of <sys/time.h> for the declarations of these functions on
+	NetBSD.
+
 2025-03-21  Bruno Haible  <bruno@clisp.org>
 
 	getloadavg: Improve Linux and Android support.
diff --git a/lib/utimens.h b/lib/utimens.h
index 007958dd93..62ea7d8f5f 100644
--- a/lib/utimens.h
+++ b/lib/utimens.h
@@ -25,7 +25,7 @@
 #include <time.h>
 
 #if HAVE_UTIMENS || HAVE_LUTIMENS
-# include <sys/time.h>
+# include <sys/stat.h>
 #endif
 
 #ifdef __cplusplus