in reply to Passing undef to XSUB

It's a cheap solution, but I would probably write a wrapper.

sub setresuid { # force @_ to have three elements $#_ = 2; # replace undefs in @_ with -1 for ( @_ ) { $_ = -1 if ! defined $_; } # magic goto the real setresuid goto &real_setresuid; }