diff options
Diffstat (limited to 'lib/mlibc/options/crypt')
-rw-r--r-- | lib/mlibc/options/crypt/generic/crypt-stubs.cpp | 7 | ||||
-rw-r--r-- | lib/mlibc/options/crypt/include/crypt.h | 18 | ||||
-rw-r--r-- | lib/mlibc/options/crypt/meson.build | 13 |
3 files changed, 38 insertions, 0 deletions
diff --git a/lib/mlibc/options/crypt/generic/crypt-stubs.cpp b/lib/mlibc/options/crypt/generic/crypt-stubs.cpp new file mode 100644 index 0000000..65e0d23 --- /dev/null +++ b/lib/mlibc/options/crypt/generic/crypt-stubs.cpp @@ -0,0 +1,7 @@ +#include <crypt.h> +#include <bits/ensure.h> + +char *crypt(const char *, const char *) { + __ensure(!"Not implemented"); + __builtin_unreachable(); +} diff --git a/lib/mlibc/options/crypt/include/crypt.h b/lib/mlibc/options/crypt/include/crypt.h new file mode 100644 index 0000000..bf3a512 --- /dev/null +++ b/lib/mlibc/options/crypt/include/crypt.h @@ -0,0 +1,18 @@ +#ifndef _CRYPT_H +#define _CRYPT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __MLIBC_ABI_ONLY + +char *crypt(const char *, const char *); + +#endif /* !__MLIBC_ABI_ONLY */ + +#ifdef __cplusplus +} +#endif + +#endif // _CRYPT_H diff --git a/lib/mlibc/options/crypt/meson.build b/lib/mlibc/options/crypt/meson.build new file mode 100644 index 0000000..a476f34 --- /dev/null +++ b/lib/mlibc/options/crypt/meson.build @@ -0,0 +1,13 @@ +if disable_crypt_option + subdir_done() +endif + +libc_sources += files( + 'generic/crypt-stubs.cpp', +) + +if not no_headers + install_headers( + 'include/crypt.h', + ) +endif |