You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
478 B
24 lines
478 B
7 months ago
|
#ifndef __MEMFD_SECRET_SHIM_H
|
||
|
#define __MEMFD_SECRET_SHIM_H
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
|
||
|
/// Explicit wrapper
|
||
|
int _memfd_secret(unsigned int flags);
|
||
|
|
||
|
/// Returns nonzero if `memfd_secret()` syscall (and `_memfd_secret()` wrapper func.) is available on this device.
|
||
|
int _has_memfd_secret();
|
||
|
|
||
|
/// `ifunc` wrapper.
|
||
|
///
|
||
|
/// Falls back to `memfd_create()` on failure.
|
||
|
int memfd_secret(unsigned int flags);
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif /* __MEMFD_SECRET_SHIM_H */
|