diff --git a/compat.h b/compat.h index 49edee3f9..554700550 100644 --- a/compat.h +++ b/compat.h @@ -48,6 +48,19 @@ # define MAXHOSTNAMELEN 64 #endif +/* + * Posix versions for those without... + */ +#ifndef _S_IFMT +# define _S_IFMT S_IFMT +#endif /* _S_IFMT */ +#ifndef _S_IFREG +# define _S_IFREG S_IFREG +#endif /* _S_IFREG */ +#ifndef S_ISREG +# define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) +#endif /* S_ISREG */ + /* * Emulate seteuid() and setegid() for HP-UX */