Re: [libvirt] _lstat link failure on mingw

2008-11-07 Thread Daniel P. Berrange
On Fri, Nov 07, 2008 at 02:46:16PM +0100, Jim Meyering wrote:
 This fixes a problem spotted by Rich Jones yesterday:
 
 From 5d5042ad904f8da693c1a5e392cd4d9b86a1 Mon Sep 17 00:00:00 2001
 From: Jim Meyering [EMAIL PROTECTED]
 Date: Thu, 6 Nov 2008 20:46:46 +0100
 Subject: [PATCH] tweak lstat.c to avoid mingw link failure
 
 * gnulib/lib/lstat.c: Include sys/stat.h *before* the
 use of stat in orig_stat.  Otherwise, on mingw (which lacks lstat),
 any program using the lstat module would not get the redefinition-
 to-stat provided by gnulib's sys/stat.h.

ACK

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] _lstat link failure on mingw

2008-11-07 Thread Jim Meyering
This fixes a problem spotted by Rich Jones yesterday:

From 5d5042ad904f8da693c1a5e392cd4d9b86a1 Mon Sep 17 00:00:00 2001
From: Jim Meyering [EMAIL PROTECTED]
Date: Thu, 6 Nov 2008 20:46:46 +0100
Subject: [PATCH] tweak lstat.c to avoid mingw link failure

* gnulib/lib/lstat.c: Include sys/stat.h *before* the
use of stat in orig_stat.  Otherwise, on mingw (which lacks lstat),
any program using the lstat module would not get the redefinition-
to-stat provided by gnulib's sys/stat.h.
---
 gnulib/lib/lstat.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnulib/lib/lstat.c b/gnulib/lib/lstat.c
index 3d1bca8..aa5e8c4 100644
--- a/gnulib/lib/lstat.c
+++ b/gnulib/lib/lstat.c
@@ -25,15 +25,15 @@
 #include sys/stat.h
 #undef __need_system_sys_stat_h

+/* Specification.  */
+#include sys/stat.h
+
 static inline int
 orig_lstat (const char *filename, struct stat *buf)
 {
   return lstat (filename, buf);
 }

-/* Specification.  */
-#include sys/stat.h
-
 #include string.h
 #include errno.h

--
1.6.0.3.756.gb776d

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list