From: Vladimir Serbinenko <phcoder@gmail.com>
To: grub-devel@gnu.org
Cc: Vladimir Serbinenko <phcoder@gmail.com>
Subject: [PATCH v2 4/9] hostdisk: Fix cygwin compilation
Date: Sat, 3 May 2025 08:06:52 +0000 [thread overview]
Message-ID: <20250503081104.13555-5-phcoder@gmail.com> (raw)
In-Reply-To: <20250503081104.13555-1-phcoder@gmail.com>
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
---
grub-core/osdep/windows/hostdisk.c | 5 +++--
include/grub/osdep/hostfile_windows.h | 10 ++++++++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/grub-core/osdep/windows/hostdisk.c b/grub-core/osdep/windows/hostdisk.c
index aaa6e2f8e..4d37d9db0 100644
--- a/grub-core/osdep/windows/hostdisk.c
+++ b/grub-core/osdep/windows/hostdisk.c
@@ -669,13 +669,14 @@ grub_util_is_special_file (const char *name)
#else
-void
+int
grub_util_file_sync (FILE *f)
{
fflush (f);
if (!allow_fd_syncs)
- return;
+ return 0;
fsync (fileno (f));
+ return 0;
}
FILE *
diff --git a/include/grub/osdep/hostfile_windows.h b/include/grub/osdep/hostfile_windows.h
index bf6451b6d..a712170d1 100644
--- a/include/grub/osdep/hostfile_windows.h
+++ b/include/grub/osdep/hostfile_windows.h
@@ -77,6 +77,16 @@ enum grub_util_fd_open_flags_t
#endif
+#ifdef __CYGWIN__
+#include <unistd.h>
+
+static inline ssize_t
+grub_util_readlink (const char *name, char *buf, size_t bufsize)
+{
+ return readlink(name, buf, bufsize);
+}
+#endif
+
LPTSTR
grub_util_utf8_to_tchar (const char *in);
char *
--
2.49.0
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next prev parent reply other threads:[~2025-05-03 8:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-03 8:06 [PATCH v2 0/9] Fix compilation and installation on cygwin and mingw Vladimir Serbinenko
2025-05-03 8:06 ` [PATCH v2 1/9] Fix error when cross-compiling for windows from unix-like OS Vladimir Serbinenko
2025-05-03 8:06 ` [PATCH v2 2/9] compiler-rt: Add pei386_runtime_relocator stub Vladimir Serbinenko
2025-05-03 8:06 ` [PATCH v2 3/9] pe2elf: Set correct flag for relocation sections Vladimir Serbinenko
2025-05-03 8:06 ` Vladimir Serbinenko [this message]
2025-05-03 8:06 ` [PATCH v2 5/9] Add cygwin path to unifont Vladimir Serbinenko
2025-05-03 8:06 ` [PATCH v2 6/9] Strip extra sections generated on cygwin when creating binary images Vladimir Serbinenko
2025-05-03 8:06 ` [PATCH v2 7/9] mkrescue: Fix compilation under cygwin Vladimir Serbinenko
2025-05-03 8:06 ` [PATCH v2 8/9] Discard .buildid and .reloc in cygwin script Vladimir Serbinenko
2025-05-03 8:06 ` [PATCH v2 9/9] render-label: Supports canonical paths not starting with / Vladimir Serbinenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250503081104.13555-5-phcoder@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.