[sudo-users] Sudo on AIX 6.1

Todd C. Miller Todd.Miller at courtesan.com
Fri Mar 2 09:28:37 EST 2012

On Fri, 02 Mar 2012 08:32:44 EST, David Flatley wrote:

> configure:15320: gcc -o conftest -g -02  conftest.c  >&5
> In file included frm conftest.c:58:
> /usr/include/unistd.h:924: error: expected ')' before ']' token
> /usr/include/unistd.h:925: error declaration specifiers or '...' before
> 'rid_t'

I don't have that error on an AIX 6.1 machine here but from the
line numbers it appears your headers are slightly different.

My guess is that line 924 looks something like this:

        extern int              setroles(rid_t [], int);

which would indicate that rid_t is not being defined.  This should
be typedef'd in /usr/include/sys/types.h

It's possible that you have a gcc installation from an old version
of AIX (or the OS was upgraded after gcc was installed).  There are
often a set of "fixed" include files in the gcc lib dir and when
those get out of sync with the system includes you get problems
like this.

Depending on where your gcc is installed, those headers may be in
a location like /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.2.0/include
My guess is that there is a sys/types.h in there that no longer
matches /usr/include/sys/types.h and is missing the rid_t typedef.
If that is the case, you should be able to just copy that bit from
/usr/include/sys/types.h to the gcc version.

 - todd

More information about the sudo-users mailing list