From bcfc193cbb4edb108d15c67f6550905c1689d216 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sat, 11 May 2013 00:13:44 +0400 Subject: patches for illumos libc --- debian/patches/libs.patch | 17 ++++++++++ debian/patches/libtelnet-libc.patch | 63 +++++++++++++++++++++++++++++++++++++ debian/patches/series | 2 ++ 3 files changed, 82 insertions(+) create mode 100644 debian/patches/libs.patch create mode 100644 debian/patches/libtelnet-libc.patch diff --git a/debian/patches/libs.patch b/debian/patches/libs.patch new file mode 100644 index 0000000..6fbb423 --- /dev/null +++ b/debian/patches/libs.patch @@ -0,0 +1,17 @@ +Index: inetutils/configure.ac +=================================================================== +--- inetutils.orig/configure.ac 2013-05-10 19:28:56.480948206 +0400 ++++ inetutils/configure.ac 2013-05-10 23:47:01.229077565 +0400 +@@ -140,9 +140,9 @@ + gl_INIT + + ### Checks for libraries. +-#AC_CHECK_LIB(nsl, inet_ntoa) +-#AC_CHECK_LIB(resolv, gethostname) +-AC_CHECK_LIB(socket, getpeername) ++AC_SEARCH_LIBS(getpeername, socket) ++AC_SEARCH_LIBS(inet_ntop, nsl) ++AC_SEARCH_LIBS(gethostname, resolv) + + # See if a termcap library is available (under one of several names) + IU_LIB_TERMCAP 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 ++/* ++ * 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 ++#endif ++ + #ifdef ENCRYPTION + void encrypt_init (char *, int); + Encryptions *findencryption (int); diff --git a/debian/patches/series b/debian/patches/series index 3069639..1c369f7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,3 +8,5 @@ 70_ftbfs_non-linux.patch 71_ftbfs_format_security.patch 0001-ping-CVE-2010-2529.patch +libtelnet-libc.patch +libs.patch -- cgit v1.2.3