[libvirt] _lstat link failure on mingw

This fixes a problem spotted by Rich Jones yesterday:
From 5d5042ad904f8da6ffff93c1a5e392cd4d9b86a1 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> 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

On Fri, Nov 07, 2008 at 02:46:16PM +0100, Jim Meyering wrote:
This fixes a problem spotted by Rich Jones yesterday:
Dan actually, but +1 anyway. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top

On Fri, Nov 07, 2008 at 02:46:16PM +0100, Jim Meyering wrote:
This fixes a problem spotted by Rich Jones yesterday:
From 5d5042ad904f8da6ffff93c1a5e392cd4d9b86a1 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> 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 :|
participants (3)
-
Daniel P. Berrange
-
Jim Meyering
-
Richard W.M. Jones