/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#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"
#ifndef AFS_LINUX20_ENV
/* As kauth/user.c says, handle smoothly the case where no AFS system call
* exists (yet). */
- sig_t old = signal(SIGSYS, SIG_IGN);
+ void (*old)(int) = signal(SIGSYS, SIG_IGN);
#endif
#if defined(AFS_LINUX20_ENV)
- rval = proc_afs_syscall(AFSCALL_PIOCTL, (long)path, cmd, (long)cmarg,
+ rval = proc_afs_syscall(AFSCALL_PIOCTL, (long)path, cmd, (long)cmarg,
follow, &errcode);
if(rval)
- errcode = syscall(AFS_SYSCALL, AFSCALL_PIOCTL, path, cmd, cmarg,
+ errcode = syscall(AFS_SYSCALL, AFSCALL_PIOCTL, path, cmd, cmarg,
follow);
#elif defined(AFS_DARWIN80_ENV)
rval = ioctl_afs_syscall(AFSCALL_PIOCTL, (long)path, cmd, (long)cmarg,
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