* grub-core/osdep/windows/hostdisk.c: Fix cygwin compilation.
This commit is contained in:
parent
6b8a162516
commit
f2c6ff15e5
2 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2013-12-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/osdep/windows/hostdisk.c: Fix cygwin compilation.
|
||||||
|
|
||||||
2013-12-14 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-12-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/osdep/windows/blocklist.c: Add missing cast in printf
|
* grub-core/osdep/windows/blocklist.c: Add missing cast in printf
|
||||||
|
|
|
@ -48,6 +48,10 @@
|
||||||
#include <winioctl.h>
|
#include <winioctl.h>
|
||||||
#include <wincrypt.h>
|
#include <wincrypt.h>
|
||||||
|
|
||||||
|
#ifdef __CYGWIN__
|
||||||
|
#include <sys/cygwin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if SIZEOF_TCHAR == 1
|
#if SIZEOF_TCHAR == 1
|
||||||
|
|
||||||
LPTSTR
|
LPTSTR
|
||||||
|
@ -441,7 +445,6 @@ get_temp_name (void)
|
||||||
TCHAR *ptr;
|
TCHAR *ptr;
|
||||||
HCRYPTPROV hCryptProv;
|
HCRYPTPROV hCryptProv;
|
||||||
grub_uint8_t rnd[5];
|
grub_uint8_t rnd[5];
|
||||||
const size_t sz = sizeof (rnd) * GRUB_CHAR_BIT / 5;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
GetTempPath (ARRAY_SIZE (rt) - 100, rt);
|
GetTempPath (ARRAY_SIZE (rt) - 100, rt);
|
||||||
|
@ -614,6 +617,15 @@ grub_util_is_special_file (const char *name)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
void
|
||||||
|
grub_util_file_sync (FILE *f)
|
||||||
|
{
|
||||||
|
fflush (f);
|
||||||
|
if (!allow_fd_syncs)
|
||||||
|
return;
|
||||||
|
fsync (fileno (f));
|
||||||
|
}
|
||||||
|
|
||||||
FILE *
|
FILE *
|
||||||
grub_util_fopen (const char *path, const char *mode)
|
grub_util_fopen (const char *path, const char *mode)
|
||||||
{
|
{
|
||||||
|
@ -625,7 +637,7 @@ grub_util_is_special_file (const char *path)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
if (lstat (destnew, &st) == -1)
|
if (lstat (path, &st) == -1)
|
||||||
return 1;
|
return 1;
|
||||||
return (!S_ISREG (st.st_mode) && !S_ISDIR (st.st_mode));
|
return (!S_ISREG (st.st_mode) && !S_ISDIR (st.st_mode));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue