sys: Tidy up header includes
[openafs.git] / src / sys / pioctl.c
index 60f0fa5..98dd560 100644 (file)
 
 #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"
 
@@ -71,6 +65,12 @@ lpioctl(char *path, int cmd, void *cmarg, int follow)
                             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