]> granicus.if.org Git - python/commitdiff
bpo-32660: Solaris should support constants like termios' FIONREAD (#5328)
authorjcea <jcea@jcea.es>
Sun, 28 Jan 2018 13:00:48 +0000 (14:00 +0100)
committerGitHub <noreply@github.com>
Sun, 28 Jan 2018 13:00:48 +0000 (14:00 +0100)
Misc/NEWS.d/next/Library/2018-01-26-01-26-00.bpo-32660.tVJIWV.rst [new file with mode: 0644]
Modules/termios.c

diff --git a/Misc/NEWS.d/next/Library/2018-01-26-01-26-00.bpo-32660.tVJIWV.rst b/Misc/NEWS.d/next/Library/2018-01-26-01-26-00.bpo-32660.tVJIWV.rst
new file mode 100644 (file)
index 0000000..5b33e1a
--- /dev/null
@@ -0,0 +1,2 @@
+:mod:`termios` makes available ``FIONREAD``, ``FIONCLEX``, ``FIOCLEX``,
+``FIOASYNC`` and ``FIONBIO`` also under Solaris/derivatives.
index 6ed4395ae4dd4c16e0a987a3c8943b3ba1f0d265..b4aa77f89764a0a85f9e4ae3a80d20d49d8a08c8 100644 (file)
@@ -8,6 +8,12 @@
 #define CTRL(c) ((c)&037)
 #endif
 
+#if defined(__sun)
+/* We could do better. Check issue-32660 */
+#include <sys/filio.h>
+#include <sys/sockio.h>
+#endif
+
 #include <termios.h>
 #include <sys/ioctl.h>