3165 Privilege.xs perform unsafe casting of priv_ptype_t to int
Reviewed by: Richard Lowe <
[email protected]>
Approved by: Dan McDonald <
[email protected]>
--- a/usr/src/cmd/perl/contrib/Sun/Solaris/Privilege/Privilege.xs Sat Sep 08 13:50:33 2012 -0400
+++ b/usr/src/cmd/perl/contrib/Sun/Solaris/Privilege/Privilege.xs Sat Sep 08 13:51:40 2012 -0400
@@ -11,7 +11,7 @@
#include "perl.h"
#include "XSUB.h"
-#define IVCONST(s, c) newCONSTSUB(s, #c, newSViv((int)c));
+#define IVCONST(s, c) newCONSTSUB(s, #c, newSViv((int)(intptr_t)c));
#define POFF (sizeof ("PRIV_") - 1)
#define RETPRIVSET(set) \