mirror of
https://github.com/systemd/systemd.git
synced 2026-07-18 05:20:07 +00:00
```
In file included from ../src/test/test-dlopen-so.c:21:
../src/test/test-dlopen-so.c: In function ‘run’:
../src/test/test-dlopen-so.c:53:23: error: implicit declaration of function ‘dlopen_libaudit’; did you mean ‘dlopen_libfido2’? [-Werror=implicit-function-declaration]
53 | ASSERT_DLOPEN(dlopen_libaudit, HAVE_AUDIT);
| ^~~~~~~~~~~~~~~
../src/shared/tests.h:181:24: note: in definition of macro ‘ASSERT_OK’
181 | typeof(expr) _result = (expr); \
| ^~~~
../src/test/test-dlopen-so.c:53:9: note: in expansion of macro ‘ASSERT_DLOPEN’
53 | ASSERT_DLOPEN(dlopen_libaudit, HAVE_AUDIT);
| ^~~~~~~~~~~~~
../src/test/test-dlopen-so.c:53:23: warning: nested extern declaration of ‘dlopen_libaudit’ [-Wnested-externs]
53 | ASSERT_DLOPEN(dlopen_libaudit, HAVE_AUDIT);
| ^~~~~~~~~~~~~~~
../src/shared/tests.h:181:24: note: in definition of macro ‘ASSERT_OK’
181 | typeof(expr) _result = (expr); \
| ^~~~
../src/test/test-dlopen-so.c:53:9: note: in expansion of macro ‘ASSERT_DLOPEN’
53 | ASSERT_DLOPEN(dlopen_libaudit, HAVE_AUDIT);
| ^~~~~~~~~~~~~
```
Follow-up for 4d8c5c657a
22 lines
459 B
C
22 lines
459 B
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
#pragma once
|
|
|
|
#include "forward.h"
|
|
|
|
int dlopen_libaudit(void);
|
|
|
|
#if HAVE_AUDIT
|
|
# include <libaudit.h> /* IWYU pragma: export */
|
|
|
|
# include "dlfcn-util.h"
|
|
|
|
extern DLSYM_PROTOTYPE(audit_log_acct_message);
|
|
extern DLSYM_PROTOTYPE(audit_log_user_avc_message);
|
|
extern DLSYM_PROTOTYPE(audit_log_user_comm_message);
|
|
#endif
|
|
|
|
bool use_audit(void);
|
|
|
|
int close_audit_fd(int fd);
|
|
int open_audit_fd_or_warn(void);
|