aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/access.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/os/access.c')
-rw-r--r--xorg-server/os/access.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c
index d8fd7e48a..c7ff245d8 100644
--- a/xorg-server/os/access.c
+++ b/xorg-server/os/access.c
@@ -106,7 +106,7 @@ SOFTWARE.
#include <netinet/in.h>
#endif /* TCPCONN || STREAMSCONN */
-#ifdef HAS_GETPEERUCRED
+#ifdef HAVE_GETPEERUCRED
# include <ucred.h>
# ifdef sun
# include <zone.h>
@@ -146,7 +146,7 @@ SOFTWARE.
#endif
#endif
-#ifdef HAS_GETIFADDRS
+#ifdef HAVE_GETIFADDRS
#include <ifaddrs.h>
#endif
@@ -665,7 +665,7 @@ in6_fillscopeid(struct sockaddr_in6 *sin6)
void
DefineSelf (int fd)
{
-#ifndef HAS_GETIFADDRS
+#ifndef HAVE_GETIFADDRS
char *cp, *cplim;
# ifdef USE_SIOCGLIFCONF
struct sockaddr_storage buf[16];
@@ -680,7 +680,7 @@ DefineSelf (int fd)
register struct ifreq *ifr;
# endif
void * bufptr = buf;
-#else /* HAS_GETIFADDRS */
+#else /* HAVE_GETIFADDRS */
struct ifaddrs * ifap, *ifr;
#endif
int len;
@@ -688,7 +688,7 @@ DefineSelf (int fd)
int family;
register HOST *host;
-#ifndef HAS_GETIFADDRS
+#ifndef HAVE_GETIFADDRS
len = sizeof(buf);
@@ -859,7 +859,7 @@ DefineSelf (int fd)
}
if (bufptr != buf)
free(bufptr);
-#else /* HAS_GETIFADDRS */
+#else /* HAVE_GETIFADDRS */
if (getifaddrs(&ifap) < 0) {
ErrorF("Warning: getifaddrs returns %s\n", strerror(errno));
return;
@@ -947,7 +947,7 @@ DefineSelf (int fd)
} /* for */
freeifaddrs(ifap);
-#endif /* HAS_GETIFADDRS */
+#endif /* HAVE_GETIFADDRS */
/*
* add something of FamilyLocalHost
@@ -968,7 +968,7 @@ DefineSelf (int fd)
}
}
}
-#endif /* hpux && !HAS_IFREQ */
+#endif /* hpux && !HAVE_IFREQ */
#ifdef XDMCP
void
@@ -1266,14 +1266,14 @@ LocalClientCred(ClientPtr client, int *pUid, int *pGid)
int
GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp)
{
-#if defined(HAS_GETPEEREID) || defined(HAS_GETPEERUCRED) || defined(SO_PEERCRED)
+#if defined(HAVE_GETPEEREID) || defined(HAVE_GETPEERUCRED) || defined(SO_PEERCRED)
int fd;
XtransConnInfo ci;
LocalClientCredRec *lcc;
-#ifdef HAS_GETPEEREID
+#ifdef HAVE_GETPEEREID
uid_t uid;
gid_t gid;
-#elif defined(HAS_GETPEERUCRED)
+#elif defined(HAVE_GETPEERUCRED)
ucred_t *peercred = NULL;
const gid_t *gids;
#elif defined(SO_PEERCRED)
@@ -1284,7 +1284,7 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp)
if (client == NULL)
return -1;
ci = ((OsCommPtr)client->osPrivate)->trans_conn;
-#if !(defined(sun) && defined(HAS_GETPEERUCRED))
+#if !(defined(sun) && defined(HAVE_GETPEERUCRED))
/* Most implementations can only determine peer credentials for Unix
* domain sockets - Solaris getpeerucred can work with a bit more, so
* we just let it tell us if the connection type is supported or not
@@ -1300,7 +1300,7 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp)
lcc = *lccp;
fd = _XSERVTransGetConnectionNumber(ci);
-#ifdef HAS_GETPEEREID
+#ifdef HAVE_GETPEEREID
if (getpeereid(fd, &uid, &gid) == -1) {
FreeLocalClientCreds(lcc);
return -1;
@@ -1309,7 +1309,7 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp)
lcc->egid = gid;
lcc->fieldsSet = LCC_UID_SET | LCC_GID_SET;
return 0;
-#elif defined(HAS_GETPEERUCRED)
+#elif defined(HAVE_GETPEERUCRED)
if (getpeerucred(fd, &peercred) < 0) {
FreeLocalClientCreds(lcc);
return -1;