Use POSIX macros for linux

This commit is contained in:
chase
2018-05-24 16:24:41 -05:00
committed by Jon Trulson
parent 164e695cd0
commit 4f5e7fe5e3
265 changed files with 394 additions and 394 deletions

View File

@@ -49,7 +49,7 @@
#include <locale.h>
#include <sys/param.h> /* for MAXPATHLEN and MAXHOSTNAMELEN */
#if defined(sun) || defined(linux)
#if defined(sun) || defined(__linux__)
#include <crypt.h>
#include <shadow.h>
#endif
@@ -403,7 +403,7 @@ SetGidUid ( unsigned short rgid, unsigned short ruid )
/* fix process gid */
#if defined(SVR4) || defined(_AIX)
setgid(rgid);
#elif defined(linux) || defined(CSRG_BASED)
#elif defined(__linux__) || defined(CSRG_BASED)
if(-1 == setregid(rgid, rgid)) {
fprintf(stderr, "SetGidUid: setregid failed on %d\n", rgid);
}
@@ -416,7 +416,7 @@ SetGidUid ( unsigned short rgid, unsigned short ruid )
/* fix process uid */
#if defined (SVR4) || defined (_AIX)
setuid(ruid);
#elif defined(linux) || defined(CSRG_BASED)
#elif defined(__linux__) || defined(CSRG_BASED)
if(-1 == setreuid(ruid, ruid)) {
fprintf(stderr, "SetGidUid: setreuid failed on %d\n", ruid);
}