From 19e1b753376b35a593cd8a8ddb91aa08e314e785 Mon Sep 17 00:00:00 2001
From: Eric Blake <eblake@redhat.com>
Date: Wed, 3 Nov 2010 11:36:14 -0600
Subject: [PATCH] utimens: fix broken m4 test

* m4/utimens.m4 (gl_UTIMENS): Include correct headers.

Signed-off-by: Eric Blake <eblake@redhat.com>
---
 ChangeLog     | 5 +++++
 m4/utimens.m4 | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 72475ef395..73e19daa96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-03  Eric Blake  <eblake@redhat.com>
+
+	utimens: fix broken m4 test
+	* m4/utimens.m4 (gl_UTIMENS): Include correct headers.
+
 2010-10-28  Bruno Haible  <bruno@clisp.org>
 
 	posix_spawn*, getdtablesize: Relax license.
diff --git a/m4/utimens.m4 b/m4/utimens.m4
index 2baa256103..3e9cf3fd5d 100644
--- a/m4/utimens.m4
+++ b/m4/utimens.m4
@@ -3,7 +3,7 @@ dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-dnl serial 4
+dnl serial 5
 
 AC_DEFUN([gl_UTIMENS],
 [
@@ -25,6 +25,7 @@ AC_DEFUN([gl_UTIMENS],
        AC_RUN_IFELSE([AC_LANG_PROGRAM([[
 #include <stddef.h>
 #include <sys/times.h>
+#include <fcntl.h>
 ]], [[    int fd = open ("conftest.file", O_RDWR);
           if (fd < 0) return 1;
           if (futimesat (fd, NULL, NULL)) return 2;
-- 
2.30.2