summaryrefslogtreecommitdiff
path: root/libcrypt/crypt_stub.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-06-05 13:46:47 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-06-05 13:46:47 +0000
commit07beb34d51523f7f30e354ef08a802ed79cf09da (patch)
tree544c7c04669d4793e5e228aaa29123f4c9922521 /libcrypt/crypt_stub.c
parent64ba3e5e0836bde4e85d6d2fdd133e2d37211e86 (diff)
- make libcrypt optional. Untested.
Diffstat (limited to 'libcrypt/crypt_stub.c')
-rw-r--r--libcrypt/crypt_stub.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/libcrypt/crypt_stub.c b/libcrypt/crypt_stub.c
new file mode 100644
index 000000000..76645a046
--- /dev/null
+++ b/libcrypt/crypt_stub.c
@@ -0,0 +1,30 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * crypt() for uClibc
+ * Copyright (C) 2008 by Erik Andersen <andersen@uclibc.org>
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define __FORCE_GLIBC
+#include <crypt.h>
+#include <unistd.h>
+#include "libcrypt.h"
+#include <syscall.h>
+
+char *crypt(const char *key attribute_unused, const char *salt attribute_unused)
+{
+ __set_errno(ENOSYS);
+ return NULL;
+}
+
+void
+setkey(const char *key attribute_unused)
+{
+ __set_errno(ENOSYS);
+}
+
+void
+encrypt(char *block attribute_unused, int flag attribute_unused)
+{
+ __set_errno(ENOSYS);
+}