Displaying 2 results from an estimated 2 matches for "d5425cfaa".
2018 Jan 29
1
[PATCH] customize: Correctly handle crypt(3) returning NULL.
In particular glibc's crypt will return NULL / errno == ENOSYS and
other implementations might do that in future too.
---
customize/crypt-c.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/customize/crypt-c.c b/customize/crypt-c.c
index d5425cfaa..e358018cd 100644
--- a/customize/crypt-c.c
+++ b/customize/crypt-c.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <errno.h>
#if HAVE_CRYPT_H
#include <crypt.h>
@@ -29,6 +30,7 @@
#include <caml/alloc.h>
#include...
2018 Jan 23
1
[PATCH] customize: Use libxcrypt if available to provide crypt(3).
...Makefile.am
@@ -100,6 +100,7 @@ libcustomize_a_CPPFLAGS = \
-I$(top_srcdir)/common/edit
libcustomize_a_CFLAGS = \
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ $(LIBCRYPT_CFLAGS) \
$(LIBVIRT_CFLAGS) \
$(LIBXML2_CFLAGS) \
-fPIC
diff --git a/customize/crypt-c.c b/customize/crypt-c.c
index 70e6ea7f5..d5425cfaa 100644
--- a/customize/crypt-c.c
+++ b/customize/crypt-c.c
@@ -22,6 +22,10 @@
#include <stdlib.h>
#include <unistd.h>
+#if HAVE_CRYPT_H
+#include <crypt.h>
+#endif
+
#include <caml/alloc.h>
#include <caml/memory.h>
#include <caml/mlvalues.h>
diff --git a/m...