public inbox for
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: fix mknod (64-bit only)
@ 2022-05-25 16:51 Ken Brown
  0 siblings, 0 replies; only message in thread
From: Ken Brown @ 2022-05-25 16:51 UTC (permalink / raw)
  To: cygwin-cvs;h=2f8ba4004675ff13741dcfd7de2014bec6834ca3

commit 2f8ba4004675ff13741dcfd7de2014bec6834ca3
Author: Ken Brown <>
Date:   Sun May 22 11:43:44 2022 -0400

    Cygwin: fix mknod (64-bit only)
    The current definition of mknod in has a third argument of
    type __dev16_t instead of dev_t.  Fix this on 64-bit Cygwin by making
    the existing mknod 32-bit only and then exporting mknod as an alias
    for mknod32.  (No fix is needed on 32-bit because mknod is redirected
    to mknod32 via NEW_FUNCTIONS in

 winsup/cygwin/release/3.3.6 | 3 +++
 winsup/cygwin/   | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/winsup/cygwin/release/3.3.6 b/winsup/cygwin/release/3.3.6
index 6d722433f..135f33155 100644
--- a/winsup/cygwin/release/3.3.6
+++ b/winsup/cygwin/release/3.3.6
@@ -7,3 +7,6 @@ Bug Fixes
 - Fix killpg failing because the exec'ing as well as the exec'ed
   process are not in the pidlist for a brief moment.
+- Fix mknod (64-bit only), whose definition didn't match its prototype.
+  Addresses:
diff --git a/winsup/cygwin/ b/winsup/cygwin/
index 3a652c4f4..344d1d329 100644
--- a/winsup/cygwin/
+++ b/winsup/cygwin/
@@ -3490,11 +3490,15 @@ mknod32 (const char *path, mode_t mode, dev_t dev)
   return -1;
+#ifdef __i386__
 extern "C" int
 mknod (const char *_path, mode_t mode, __dev16_t dev)
   return mknod32 (_path, mode, (dev_t) dev);
+EXPORT_ALIAS (mknod32, mknod)
 extern "C" int
 mkfifo (const char *path, mode_t mode)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-25 16:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 16:51 [newlib-cygwin] Cygwin: fix mknod (64-bit only) Ken Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).