diff -pruN 0.9.35-2.1/debian/changelog 0.9.35-2.1ubuntu2/debian/changelog
--- 0.9.35-2.1/debian/changelog	2011-08-24 19:18:15.000000000 +0000
+++ 0.9.35-2.1ubuntu2/debian/changelog	2011-08-24 19:18:15.000000000 +0000
@@ -1,3 +1,21 @@
+pavuk (0.9.35-2.1ubuntu2) oneiric; urgency=low
+
+  * src/myssl_openssl.c: consider the case of disabled SSLv2. Fixes FTBFS
+    with OpenSSL 1.0.0.
+
+ -- Ilya Barygin <barygin@gmail.com>  Sun, 21 Aug 2011 21:00:17 +0400
+
+pavuk (0.9.35-2.1ubuntu1) jaunty; urgency=low
+
+  * Fixed FTBFS:
+    + src/tools.c:1729:
+      Changed  if((fd = open(filename, O_WRONLY | O_BINARY | O_CREAT | O_TRUNC), 0644) < 0)
+      to  if((fd = open(filename, O_WRONLY | O_BINARY | O_CREAT | O_TRUNC, 0644)) < 0)
+      (Patch is inlined in .diff.gz, not introducing a new patch system)
+  * This upload will also catch up with latest libdb
+
+ -- Stephan Hermann <sh@sourcecode.de>  Wed, 12 Nov 2008 09:11:47 +0000
+
 pavuk (0.9.35-2.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -pruN 0.9.35-2.1/debian/control 0.9.35-2.1ubuntu2/debian/control
--- 0.9.35-2.1/debian/control	2011-08-24 19:18:15.000000000 +0000
+++ 0.9.35-2.1ubuntu2/debian/control	2011-08-24 19:18:15.000000000 +0000
@@ -1,7 +1,8 @@
 Source: pavuk
 Section: web
 Priority: optional
-Maintainer: Petr Čech <cech@debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Petr Čech <cech@debian.org>
 Build-Depends: debhelper (>= 4), gettext, libdb-dev, libglib2.0-dev, libgtk2.0-dev, libsocks4, libssl-dev (>= 0.9.8) , libx11-dev, libxmu-dev, zlib1g-dev
 Build-Conflicts: libsocksd-dev
 Standards-Version: 3.7.2
diff -pruN 0.9.35-2.1/src/myssl_openssl.c 0.9.35-2.1ubuntu2/src/myssl_openssl.c
--- 0.9.35-2.1/src/myssl_openssl.c	2005-08-15 08:59:30.000000000 +0000
+++ 0.9.35-2.1ubuntu2/src/myssl_openssl.c	2011-08-24 19:18:15.000000000 +0000
@@ -543,9 +543,11 @@ bufio *my_ssl_do_connect(doc * docp, buf
 
   switch (cfg.ssl_version)
   {
+#ifndef OPENSSL_NO_SSL2
   case 2:
     method = SSLv2_client_method();
     break;
+#endif
   case 3:
     method = SSLv3_client_method();
     break;
diff -pruN 0.9.35-2.1/src/tools.c 0.9.35-2.1ubuntu2/src/tools.c
--- 0.9.35-2.1/src/tools.c	2006-02-27 16:24:13.000000000 +0000
+++ 0.9.35-2.1ubuntu2/src/tools.c	2011-08-24 19:18:15.000000000 +0000
@@ -1726,7 +1726,7 @@ int tl_save_text_file(char *filename, ch
   if(length < 0)
     length = strlen(content);
 
-  if((fd = open(filename, O_WRONLY | O_BINARY | O_CREAT | O_TRUNC), 0644) < 0)
+  if((fd = open(filename, O_WRONLY | O_BINARY | O_CREAT | O_TRUNC, 0644)) < 0)
   {
     xperror(filename);
     return -1;

