"Henning Nielsen Lund" <[EMAIL PROTECTED]> writes: > As 'struct stat' is used in the file_has_acl() prototype of acl.h, would I > include sys/stat.h.
Thanks, but while we're doing that I noticed also that acl.c isn't including acl.h first, as is the usual style; also, older hosts require that you include sys/types.h before sys/stat.h (POSIX used to require that before 2001). So I installed this fix: 2006-12-29 Paul Eggert <[EMAIL PROTECTED]> * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and struct stat. Problem reported by Henning Nielsen Lund. * lib/acl.c: Include acl.h first, to check interface. Don't bother to include sys/types.h and sys/stat.h again. --- lib/acl.h 9 Jan 2006 23:13:56 -0000 1.3 +++ lib/acl.h 29 Dec 2006 19:33:43 -0000 @@ -25,6 +25,9 @@ # define GETACLCNT ACL_CNT #endif +#include <sys/types.h> +#include <sys/stat.h> + int file_has_acl (char const *, struct stat const *); int copy_acl (char const *, int, char const *, int, mode_t); int set_acl (char const *, int, mode_t); --- lib/acl.c 25 Sep 2006 16:08:26 -0000 1.8 +++ lib/acl.c 29 Dec 2006 19:33:43 -0000 @@ -20,11 +20,11 @@ #include <config.h> +#include "acl.h" + #include <stdbool.h> #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <sys/stat.h> #ifndef S_ISLNK # define S_ISLNK(Mode) 0 #endif @@ -33,7 +33,6 @@ # include <acl/libacl.h> #endif -#include "acl.h" #include "error.h" #include "quote.h"