perl/perl-5.8.7-IOC_SIZE.patch
2005-10-25 22:16:09 +00:00

24 lines
672 B
Diff

--- perl-5.8.7/perl.h.IOC_SIZE 2005-05-07 16:11:45.000000000 -0400
+++ perl-5.8.7/perl.h 2005-10-25 16:56:10.000000000 -0400
@@ -2508,11 +2508,17 @@
#ifndef IOCPARM_LEN
# ifdef IOCPARM_MASK
- /* on BSDish systes we're safe */
+ /* on BSDish systems we're safe */
# define IOCPARM_LEN(x) (((x) >> 16) & IOCPARM_MASK)
# else
- /* otherwise guess at what's safe */
-# define IOCPARM_LEN(x) 256
+# ifdef _IOC_SIZE
+ /* on Linux systems we're safe */
+# define IOCPARM_LEN(x) _IOC_SIZE(x)
+# else
+ /* otherwise guess at what's safe (we're UNSAFE!) */
+# warning "unsafe assumption of IOCPARM_LEN=256"
+# define IOCPARM_LEN(x) 256
+# endif
# endif
#endif