]> xenbits.xensource.com Git - libvirt.git/commitdiff
tweak lstat.c to avoid mingw link failure
authorJim Meyering <meyering@redhat.com>
Fri, 7 Nov 2008 16:44:38 +0000 (16:44 +0000)
committerJim Meyering <meyering@redhat.com>
Fri, 7 Nov 2008 16:44:38 +0000 (16:44 +0000)
* 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.  Reported by Daniel P. Berrange.

ChangeLog
gnulib/lib/lstat.c

index 7bbee851e9ec1bc771d75eecb7e18b689663e6c5..c3289ad73f93295a15330f70448a6c6b59c5359d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 Thu Nov  6 20:45:42 CET 2008 Jim Meyering <meyering@redhat.com>
 
+       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.  Reported by Daniel P. Berrange.
+
        mark a few diagnostics for translation
        * src/lxc_conf.c (lxcLoadDriverConfig): Mark a diagnostic.
        * src/lxc_driver.c (lxcDomainStart): Likewise.
index 3d1bca89532f8bc95cfa498bd9a151eb8a30a9bb..aa5e8c4210967872fd02dffd1d65a80853f7632f 100644 (file)
 #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>