ioctl: Fix compilation error on mingw.
authorLRN <lrn1986@gmail.com>
Thu, 12 Apr 2012 10:44:33 +0000 (12:44 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 12 Apr 2012 10:44:33 +0000 (12:44 +0200)
* lib/ioctl.c: Include <windows.h>.
Also reported by Ray Satiro <raysatiro@yahoo.com>.

ChangeLog
lib/ioctl.c

index d41141c..84bdeee 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-12  LRN  <lrn1986@gmail.com>  (tiny change)
+
+       ioctl: Fix compilation error on mingw.
+       * lib/ioctl.c: Include <windows.h>.
+       Also reported by Ray Satiro <raysatiro@yahoo.com>.
+
 2012-04-04  Jim Meyering  <meyering@redhat.com>
 
        regex: correct #pragma guard expression
index 2e51c92..4a2fd39 100644 (file)
@@ -46,6 +46,10 @@ rpl_ioctl (int fd, int request, ... /* {void *,char *} arg */)
 
 # include <errno.h>
 
+/* Get HANDLE.  */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
 # include "fd-hook.h"
 /* Get _get_osfhandle.  */
 # include "msvc-nothrow.h"