[PATCH crypt 4/8] Guard GNU extensions in header, declare other functions

Yaakov Selkowitz yselkowi@redhat.com
Fri Aug 4 02:58:00 GMT 2017


---
 crypt.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/crypt.h b/crypt.h
index 07de216..921e45a 100644
--- a/crypt.h
+++ b/crypt.h
@@ -5,14 +5,21 @@
 extern "C" {
 #endif
 
+void encrypt(char *, int);
+void setkey(char *);
+char *crypt(const char *, const char *);
+
+#ifdef _GNU_SOURCE
+
 struct crypt_data {
 	int initialized;
 	char __buf[256];
 };
 
-char *crypt(const char *, const char *);
 char *crypt_r(const char *, const char *, struct crypt_data *);
 
+#endif /* _GNU_SOURCE */
+
 #ifdef __cplusplus
 }
 #endif
-- 
2.13.2



More information about the Cygwin-apps mailing list