along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdbool.h>
-#include <errno.h>
+#include <errno.h>
#include "audit-fd.h"
-#include "log.h"
#ifdef HAVE_AUDIT
+#include <stdbool.h>
#include <libaudit.h>
+#include "log.h"
+#include "util.h"
+
static bool initialized = false;
static int audit_fd;
void close_audit_fd(void) {
if (initialized && audit_fd >= 0)
- close_nointr_nofail(audit_fd);
+ safe_close(audit_fd);
initialized = true;
audit_fd = -ECONNRESET;