From 9349e3ff689d2a8f69c0b726fbffc07669aa1bb5 Mon Sep 17 00:00:00 2001 From: Pavel Koneski Date: Wed, 26 Feb 2025 20:59:12 -0800 Subject: [PATCH 1/2] Disable fcntl directory notify constants on Mono --- src/core/IronPython.Modules/fcntl.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/IronPython.Modules/fcntl.cs b/src/core/IronPython.Modules/fcntl.cs index 67aeb43d1..d14f4c95c 100644 --- a/src/core/IronPython.Modules/fcntl.cs +++ b/src/core/IronPython.Modules/fcntl.cs @@ -537,6 +537,8 @@ private static bool TryGetInt64(object? obj, out long value) { // Linux only #region Generated Directory Notify Flags +#if NET + // Disabled on Mono because of inability to open directory descriptors // *** BEGIN GENERATED CODE *** // generated by function: generate_DN_flags from: generate_os_codes.py @@ -572,5 +574,6 @@ private static bool TryGetInt64(object? obj, out long value) { // *** END GENERATED CODE *** +#endif #endregion } \ No newline at end of file From 4e1f1bea3d1fff34f3a0e16720ea2677920c0fd5 Mon Sep 17 00:00:00 2001 From: Pavel Koneski Date: Wed, 26 Feb 2025 21:33:38 -0800 Subject: [PATCH 2/2] Fix generate script check --- src/core/IronPython.Modules/fcntl.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/IronPython.Modules/fcntl.cs b/src/core/IronPython.Modules/fcntl.cs index d14f4c95c..ed9189858 100644 --- a/src/core/IronPython.Modules/fcntl.cs +++ b/src/core/IronPython.Modules/fcntl.cs @@ -535,10 +535,10 @@ private static bool TryGetInt64(object? obj, out long value) { #endregion - // Linux only - #region Generated Directory Notify Flags #if NET + // Linux only // Disabled on Mono because of inability to open directory descriptors + #region Generated Directory Notify Flags // *** BEGIN GENERATED CODE *** // generated by function: generate_DN_flags from: generate_os_codes.py @@ -574,6 +574,6 @@ private static bool TryGetInt64(object? obj, out long value) { // *** END GENERATED CODE *** -#endif #endregion +#endif } \ No newline at end of file