Add unistd.h include config magic
This commit is contained in:
parent
228b31e100
commit
5a17b1401d
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue