#include <afsconfig.h>
#include <afs/param.h>
-#include <signal.h>
+
+#include <roken.h>
#include <afs/afs_args.h>
-#if defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV)
-#include <unistd.h>
-#else
-#include <stdio.h>
-#endif
-#if defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
+
#include "afssyscalls.h"
#include "sys_prototypes.h"
follow, 0, 0, &errcode);
if (rval)
errcode = rval;
+#elif defined(AFS_SUN511_ENV)
+ rval = ioctl_sun_afs_syscall(AFSCALL_PIOCTL, (uintptr_t)path, cmd,
+ (uintptr_t)cmarg, follow, 0, 0, &errcode);
+ if (rval) {
+ errcode = rval;
+ }
#else
errcode = syscall(AFS_SYSCALL, AFSCALL_PIOCTL, path, cmd, cmarg, follow);
#endif