diff options
author | Ken Brown <kbrown@cornell.edu> | 2022-05-22 18:43:44 +0300 |
---|---|---|
committer | Ken Brown <kbrown@cornell.edu> | 2022-05-23 15:16:40 +0300 |
commit | 2f8ba4004675ff13741dcfd7de2014bec6834ca3 (patch) | |
tree | e8e83a54caed789623b0d76bb914f99f76e147b9 /winsup/cygwin/syscalls.cc | |
parent | 03e815a91b1a1f94ce0cfd6ff64f50ae40ed740c (diff) |
Cygwin: fix mknod (64-bit only)
The current definition of mknod in syscalls.cc 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 Makefile.am.)
Addresses: https://cygwin.com/pipermail/cygwin-developers/2022-May/012589.html
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 3a652c4f4..344d1d329 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -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); } +#else +EXPORT_ALIAS (mknod32, mknod) +#endif extern "C" int mkfifo (const char *path, mode_t mode) |