mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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.
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user