From 6570d61a59cd17548b2109de4df5f85291a6bd61 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 30 May 2018 15:51:48 +0000 Subject: [PATCH] Fix OpenBSM with GCC with -Wredundant-decls Upstream change ed47534 consciously added some redundant functional declarations, and I'm not sure why. AFAICT they were never required. On FreeBSD, they break the build with GCC (but not Clang) for any program including libbsm.h with WARNS=6. Fix by cherry-picking upstream change https://github.com/openbsm/openbsm/commit/0553c27 Reported by: emaste Reviewed by: cem Obtained from: OpenBSM MFC after: 2 weeks Pull Request: https://github.com/openbsm/openbsm/pull/31 --- contrib/openbsm/bsm/libbsm.h | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/contrib/openbsm/bsm/libbsm.h b/contrib/openbsm/bsm/libbsm.h index 62b99fc7a640..2614a84f01e2 100644 --- a/contrib/openbsm/bsm/libbsm.h +++ b/contrib/openbsm/bsm/libbsm.h @@ -872,21 +872,6 @@ void au_print_tok_xml(FILE *outfp, tokenstr_t *tok, void au_print_xml_header(FILE *outfp); void au_print_xml_footer(FILE *outfp); -/* - * BSM library routines for converting between local and BSM constant spaces. - * (Note: some of these are replicated in audit_record.h for the benefit of - * the FreeBSD and Mac OS X kernels) - */ -int au_bsm_to_domain(u_short bsm_domain, int *local_domainp); -int au_bsm_to_errno(u_char bsm_error, int *errorp); -int au_bsm_to_fcntl_cmd(u_short bsm_fcntl_cmd, int *local_fcntl_cmdp); -int au_bsm_to_socket_type(u_short bsm_socket_type, - int *local_socket_typep); -u_short au_domain_to_bsm(int local_domain); -u_char au_errno_to_bsm(int local_errno); -u_short au_fcntl_cmd_to_bsm(int local_fcntl_command); -u_short au_socket_type_to_bsm(int local_socket_type); - const char *au_strerror(u_char bsm_error); __END_DECLS