Add unistd.h include config magic

This commit is contained in:
Brian Behlendorf 2008-12-15 10:00:43 -08:00
parent 228b31e100
commit 5a17b1401d
1 changed files with 11 additions and 5 deletions

View File

@ -29,13 +29,19 @@
#ifndef _SYS_UNISTD_H #ifndef _SYS_UNISTD_H
#define _SYS_UNISTD_H #define _SYS_UNISTD_H
#ifndef HAVE_ISSETUGID #if !defined(HAVE_IOCTL_IN_UNISTD_H)
#include <sys/types.h> # if defined(HAVE_IOCTL_IN_SYS_IOCTL_H)
#define issetugid() (geteuid() == 0 || getegid() == 0) # include <sys/ioctl.h>
# elif defined(HAVE_IOCTL_IN_STROPTS_H)
# include <stropts.h>
# else
# error "System call ioctl() unavailable"
# endif
#endif #endif
#ifdef HAVE_IOCTL_IN_UNISTD_H #if !defined(HAVE_ISSETUGID)
#include <fake_ioctl.h> # include <sys/types.h>
# define issetugid() (geteuid() == 0 || getegid() == 0)
#endif #endif
#if !defined(__sun__) && !defined(__sun) #if !defined(__sun__) && !defined(__sun)