#76 --with-sun-acl doesn't work


Enabling Sun ACLs with --with-sun-acl results in duplicate definition of acl_type in include/db_config.h:

/opt/studio/SOS11/SUNWspro/bin/cc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -D__const=const -I/opt/csw/postgresql/include -I/opt/csw/include -xO3 -xarch=v8 -I/opt/csw/postgresql/include -I/opt/csw/include -xO3 -xarch=v8 -I/opt/csw/postgresql/include -I/opt/csw/include -c `test -f 'conf_yacc.c' || echo './'`conf_yacc.c
"../include/db_config.h", line 57: (struct) tag redeclared: acl_type
"../include/db_config.h", line 60: identifier redeclared: acl_type
current : struct acl_type {pointer to char acl_a, pointer to char acl_d}
previous: struct acl_type {int entries, pointer to struct acl {..} acl} : "../include/db_config.h", line 46

In fact acl_type is defined once for the Solaris ACLs and then later differently:

#ifdef WITH_SUN_ACL /* First try to implement support for sun acl. */
/*#define WITH_ACL If we use sun acl then we have acl :) */
/* Warning! if acl in database is corrupted then
this will break down. See and fix db.c */

#ifndef WITH_ACL
# error "No ACL support ... but Sun ACL support."

#include <sys/acl.h>
typedef struct acl_type{
int entries;
aclent_t* acl;
} acl_type;


#ifdef WITH_POSIX_ACL /* POSIX acl works for Sun ACL, AIUI but anyway... */
#include <sys/acl.h>
#ifndef WITH_ACL
# error "No ACL support ... but POSIX ACL support."

typedef struct acl_type {
char *acl_a; /* ACCESS */
char *acl_d; /* DEFAULT, directories only */
} acl_type;

Commenting out the latter definition does not work as acl_a is accessed at other places in the code.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks