[oe] [PATCH 3/3] openssl: properly handle ipv6 and largefile
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Wed Aug 4 13:51:58 UTC 2010
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
recipes/openssl/openssl-0.9.8m/ipv6.patch | 34 +++++++++++++++++++++++
recipes/openssl/openssl-0.9.8m/uclibc-lfs.patch | 24 ++++++++++++++++
recipes/openssl/openssl-1.0.0/uclibc-lfs.patch | 25 +++++++++++++++++
recipes/openssl/openssl-native_0.9.8m.bb | 3 +-
recipes/openssl/openssl-native_1.0.0.bb | 1 +
recipes/openssl/openssl_0.9.8m.bb | 4 ++-
recipes/openssl/openssl_1.0.0.bb | 1 +
7 files changed, 90 insertions(+), 2 deletions(-)
create mode 100644 recipes/openssl/openssl-0.9.8m/ipv6.patch
create mode 100644 recipes/openssl/openssl-0.9.8m/uclibc-lfs.patch
create mode 100644 recipes/openssl/openssl-1.0.0/uclibc-lfs.patch
diff --git a/recipes/openssl/openssl-0.9.8m/ipv6.patch b/recipes/openssl/openssl-0.9.8m/ipv6.patch
new file mode 100644
index 0000000..05df761
--- /dev/null
+++ b/recipes/openssl/openssl-0.9.8m/ipv6.patch
@@ -0,0 +1,34 @@
+diff -rdup openssl-0.9.8m.old1/crypto/bio/bss_dgram.c openssl-0.9.8m/crypto/bio/bss_dgram.c
+--- openssl-0.9.8m.old1/crypto/bio/bss_dgram.c 2009-09-22 13:33:58.000000000 +0200
++++ openssl-0.9.8m/crypto/bio/bss_dgram.c 2010-08-03 10:04:03.716585233 +0200
+@@ -429,12 +429,14 @@ static long dgram_ctrl(BIO *b, int cmd,
+ &sockopt_val, sizeof(sockopt_val))) < 0)
+ perror("setsockopt");
+ break;
++#if defined _POSIX_IPV6
+ case AF_INET6:
+ sockopt_val = IPV6_PMTUDISC_DO;
+ if ((ret = setsockopt(b->num, IPPROTO_IPV6, IPV6_MTU_DISCOVER,
+ &sockopt_val, sizeof(sockopt_val))) < 0)
+ perror("setsockopt");
+ break;
++#endif
+ default:
+ ret = -1;
+ break;
+@@ -470,6 +472,7 @@ static long dgram_ctrl(BIO *b, int cmd,
+ ret = data->mtu;
+ }
+ break;
++#if defined _POSIX_IPV6
+ case AF_INET6:
+ if ((ret = getsockopt(b->num, IPPROTO_IPV6, IPV6_MTU, (void *)&sockopt_val,
+ &sockopt_len)) < 0 || sockopt_val < 0)
+@@ -485,6 +488,7 @@ static long dgram_ctrl(BIO *b, int cmd,
+ ret = data->mtu;
+ }
+ break;
++#endif
+ default:
+ ret = 0;
+ break;
diff --git a/recipes/openssl/openssl-0.9.8m/uclibc-lfs.patch b/recipes/openssl/openssl-0.9.8m/uclibc-lfs.patch
new file mode 100644
index 0000000..c91bea8
--- /dev/null
+++ b/recipes/openssl/openssl-0.9.8m/uclibc-lfs.patch
@@ -0,0 +1,24 @@
+diff -rdup openssl-0.9.8m.old/crypto/bio/bss_file.c openssl-0.9.8m/crypto/bio/bss_file.c
+--- openssl-0.9.8m.old/crypto/bio/bss_file.c 2009-10-04 16:04:36.000000000 +0200
++++ openssl-0.9.8m/crypto/bio/bss_file.c 2010-07-30 15:21:51.436093098 +0200
+@@ -65,6 +65,7 @@
+ #ifndef HEADER_BSS_FILE_C
+ #define HEADER_BSS_FILE_C
+
++#include <features.h>
+ #if defined(__linux) || defined(__sun) || defined(__hpux)
+ /* Following definition aliases fopen to fopen64 on above mentioned
+ * platforms. This makes it possible to open and sequentially access
+@@ -78,10 +79,12 @@
+ * sequential access of large files without extra "magic" comprise *BSD,
+ * Darwin, IRIX...
+ */
++#if (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__) || !defined __UCLIBC__
+ #ifndef _FILE_OFFSET_BITS
+ #define _FILE_OFFSET_BITS 64
+ #endif
+ #endif
++#endif
+
+ #include <stdio.h>
+ #include <errno.h>
diff --git a/recipes/openssl/openssl-1.0.0/uclibc-lfs.patch b/recipes/openssl/openssl-1.0.0/uclibc-lfs.patch
new file mode 100644
index 0000000..664bbc0
--- /dev/null
+++ b/recipes/openssl/openssl-1.0.0/uclibc-lfs.patch
@@ -0,0 +1,25 @@
+diff -rdup openssl-1.0.0.orig/crypto/bio/bss_file.c openssl-1.0.0/crypto/bio/bss_file.c
+--- openssl-1.0.0.orig/crypto/bio/bss_file.c 2010-03-22 23:39:46.000000000 +0100
++++ openssl-1.0.0/crypto/bio/bss_file.c 2010-08-02 19:17:26.642347341 +0200
+@@ -65,6 +65,8 @@
+ #ifndef HEADER_BSS_FILE_C
+ #define HEADER_BSS_FILE_C
+
++#include <features.h>
++
+ #if defined(__linux) || defined(__sun) || defined(__hpux)
+ /* Following definition aliases fopen to fopen64 on above mentioned
+ * platforms. This makes it possible to open and sequentially access
+@@ -78,10 +80,12 @@
+ * sequential access of large files without extra "magic" comprise *BSD,
+ * Darwin, IRIX...
+ */
++#if (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__) || !defined __UCLIBC__
+ #ifndef _FILE_OFFSET_BITS
+ #define _FILE_OFFSET_BITS 64
+ #endif
+ #endif
++#endif
+
+ #include <stdio.h>
+ #include <errno.h>
diff --git a/recipes/openssl/openssl-native_0.9.8m.bb b/recipes/openssl/openssl-native_0.9.8m.bb
index 1b82645..53ec4f6 100644
--- a/recipes/openssl/openssl-native_0.9.8m.bb
+++ b/recipes/openssl/openssl-native_0.9.8m.bb
@@ -12,7 +12,8 @@ export BUILD_OPTIMIZATION = " "
SRC_URI += "file://configure-targets.patch \
file://shared-libs.patch \
- file://debian.patch"
+ file://debian.patch \
+ file://uclibc-lfs.patch"
PARALLEL_MAKE = ""
diff --git a/recipes/openssl/openssl-native_1.0.0.bb b/recipes/openssl/openssl-native_1.0.0.bb
index 7029bfe..7507c37 100644
--- a/recipes/openssl/openssl-native_1.0.0.bb
+++ b/recipes/openssl/openssl-native_1.0.0.bb
@@ -18,6 +18,7 @@ SRC_URI += "file://configure-targets.patch \
file://shared-libs.patch \
file://debian.patch \
file://libdeps-first.patch \
+ file://uclibc-lfs.patch \
"
PARALLEL_MAKE = ""
diff --git a/recipes/openssl/openssl_0.9.8m.bb b/recipes/openssl/openssl_0.9.8m.bb
index a7eb332..6ee1929 100644
--- a/recipes/openssl/openssl_0.9.8m.bb
+++ b/recipes/openssl/openssl_0.9.8m.bb
@@ -11,6 +11,8 @@ export OE_LDFLAGS="${LDFLAGS}"
SRC_URI += "file://configure-targets.patch \
file://shared-libs.patch \
file://debian.patch \
- file://oe-ldflags.patch"
+ file://oe-ldflags.patch \
+ file://uclibc-lfs.patch \
+ file://ipv6.patch"
PARALLEL_MAKE = ""
diff --git a/recipes/openssl/openssl_1.0.0.bb b/recipes/openssl/openssl_1.0.0.bb
index 4f7dcb7..a13d471 100644
--- a/recipes/openssl/openssl_1.0.0.bb
+++ b/recipes/openssl/openssl_1.0.0.bb
@@ -17,6 +17,7 @@ SRC_URI += "file://configure-targets.patch \
file://oe-ldflags.patch \
file://libdeps-first.patch \
file://engines-install-in-libdir-ssl.patch \
+ file://uclibc-lfs.patch \
"
PARALLEL_MAKE = ""
--
1.7.1
More information about the Openembedded-devel
mailing list