Skip to content

Commit

Permalink
Patch fcntlmodule for Solaris (#32)
Browse files Browse the repository at this point in the history
* patch fcntlmodule for solaris macro expansion oddity

* update patch

* update patch
  • Loading branch information
bjia56 authored Nov 27, 2024
1 parent fd26a78 commit 6a80bc8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions patches/3.12/06-solaris-fcntlmodule.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index 2bca40213c6..59dab31bc40 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -628,6 +628,15 @@ all_ins(PyObject* m)
#endif

#ifdef HAVE_STROPTS_H
+
+#if defined(sun) || defined(__sun)
+ #ifndef STR
+ /* for some reason, the preprocessor does not resolve this symbol */
+ /* from /usr/include/sys/stropts.h on Solaris 11 */
+ #define STR ('S'<<8)
+ #endif
+#endif
+
/* Unix 98 guarantees that these are in stropts.h. */
if (PyModule_AddIntMacro(m, I_PUSH)) return -1;
if (PyModule_AddIntMacro(m, I_POP)) return -1;

0 comments on commit 6a80bc8

Please sign in to comment.