This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Cast away const from AIX' accessx() path argument
[perl5.git] / pp_sys.c
index 00faa77..ab28ed6 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -213,8 +213,8 @@ void endservent(void);
 #endif
 
 #if !defined(PERL_EFF_ACCESS) && defined(HAS_ACCESSX) && defined(ACC_SELF)
-    /* AIX */
-#   define PERL_EFF_ACCESS(p,f) (accessx((p), (f), ACC_SELF))
+    /* AIX's accessx() doesn't declare its argument const, unlike every other platform */
+#   define PERL_EFF_ACCESS(p,f) (accessx((char*)(p), (f), ACC_SELF))
 #endif