From 1dea5535b017a169c4e89172583ed168307e8c8d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 7 Nov 2008 16:44:38 +0000 Subject: [PATCH] tweak lstat.c to avoid mingw link failure * gnulib/lib/lstat.c: Include *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 | 6 ++++++ gnulib/lib/lstat.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7bbee851e9..c3289ad73f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ Thu Nov 6 20:45:42 CET 2008 Jim Meyering + tweak lstat.c to avoid mingw link failure + * gnulib/lib/lstat.c: Include *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. diff --git a/gnulib/lib/lstat.c b/gnulib/lib/lstat.c index 3d1bca8953..aa5e8c4210 100644 --- a/gnulib/lib/lstat.c +++ b/gnulib/lib/lstat.c @@ -25,15 +25,15 @@ #include #undef __need_system_sys_stat_h +/* Specification. */ +#include + static inline int orig_lstat (const char *filename, struct stat *buf) { return lstat (filename, buf); } -/* Specification. */ -#include - #include #include