summaryrefslogtreecommitdiff
path: root/debian/patches/libtelnet-libc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/libtelnet-libc.patch')
-rw-r--r--debian/patches/libtelnet-libc.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/debian/patches/libtelnet-libc.patch b/debian/patches/libtelnet-libc.patch
new file mode 100644
index 0000000..2427ced
--- /dev/null
+++ b/debian/patches/libtelnet-libc.patch
@@ -0,0 +1,63 @@
+Description: non-gnu libc is a mess
+Index: inetutils/libtelnet/encrypt.h
+===================================================================
+--- inetutils.orig/libtelnet/encrypt.h 2011-12-31 19:02:32.000000000 +0400
++++ inetutils/libtelnet/encrypt.h 2013-05-10 23:43:15.489309964 +0400
+@@ -74,8 +74,10 @@
+ # define DIR_DECRYPT 1
+ # define DIR_ENCRYPT 2
+
++
+ typedef unsigned char Block[8];
+ typedef unsigned char *BlockT;
++#ifdef __GLIBC__
+ typedef struct
+ {
+ Block _;
+@@ -93,6 +95,31 @@
+ unsigned char *data;
+ } Session_Key;
+
++#else /* ! __GLIBC__ */
++/* illumos/solaris libc is a mess */
++#include <arpa/telnet.h>
++/*
++ * ENCRYPTion suboptions
++ */
++#define ENCRYPT_IS 0 /* I pick encryption type ... */
++#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */
++#define ENCRYPT_REPLY 2 /* Initial setup response */
++#define ENCRYPT_START 3 /* Am starting to send encrypted */
++#define ENCRYPT_END 4 /* Am ending encrypted */
++#define ENCRYPT_REQSTART 5 /* Request you start encrypting */
++#define ENCRYPT_REQEND 6 /* Request you send encrypting */
++#define ENCRYPT_ENC_KEYID 7
++#define ENCRYPT_DEC_KEYID 8
++#define ENCRYPT_CNT 9
++
++#define ENCTYPE_ANY 0
++#define ENCTYPE_DES_CFB64 1
++#define ENCTYPE_DES_OFB64 2
++#define ENCTYPE_CNT 3
++
++
++#endif /* ! __GLIBC__ */
++
+ typedef struct
+ {
+ char *name;
+Index: inetutils/libtelnet/enc-proto.h
+===================================================================
+--- inetutils.orig/libtelnet/enc-proto.h 2011-12-31 19:02:32.000000000 +0400
++++ inetutils/libtelnet/enc-proto.h 2013-05-10 23:42:12.777836935 +0400
+@@ -67,6 +67,10 @@
+ * or implied warranty.
+ */
+
++#ifndef __GLIBC__
++#include <arpa/telnet.h>
++#endif
++
+ #ifdef ENCRYPTION
+ void encrypt_init (char *, int);
+ Encryptions *findencryption (int);