OpenSSL_1_0_0-stable and HEAD use socklen_t.
Some platforms do not have the socklen_t data type.
I propose the following patch (also attached) so a person could
./config --socklen_t=int
.....
--- openssl-1.0.0/Configure.old 2009-02-19 01:43:18.000000000 -0800
+++ openssl-1.0.0/Configure 2009-04-02 14:28:35.421293044 -0700
@@ -40,6 +40,9 @@
#
# --cross-compile-prefix Add specified prefix to binutils components.
#
+# --socklen_t For systems without socklen_t data type. Set to int or
+# size_t as appropriate for your platform.
+#
# no-hw-xxx do not compile support for specific crypto hardware.
# Generic OpenSSL-style methods relating to this support
# are always compiled but return NULL if the hardware
@@ -613,6 +616,7 @@
my $exe_ext="";
my $install_prefix="";
my $cross_compile_prefix="";
+my $socklen_t="";
my $no_threads=0;
my $threads=0;
my $no_shared=0; # but "no-shared" is default
@@ -834,6 +838,10 @@
{
$cross_compile_prefix=$1;
}
+ elsif (/^--socklen_t=(.*)$/)
+ {
+ $socklen_t=$1;
+ }
else
{
print STDERR $usage;
@@ -1371,6 +1379,11 @@
}
$cmll_obj=$cmll_enc unless ($cmll_obj =~ /.o$/);
+if ($socklen_t)
+ {
+ $cflags="$cflags -DSOCKLEN_T=$socklen_t";
+ }
+
# "Stringify" the C flags string. This permits it to be made part of a string
# and works as well on command lines.
$cflags =~ s/([\\\"])/\\\1/g;
--- openssl-1.0.0/crypto/bio/b_sock.c.old 2008-01-03 14:43:01.000000000
-0800
+++ openssl-1.0.0/crypto/bio/b_sock.c 2009-04-02 14:02:28.116173005 -0700
@@ -811,7 +811,9 @@
# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_BEOS_BONE) ||
defined(OPENSSL_SYS_MSDOS)
# define SOCKLEN_T size_t
# else
+# ifndef SOCKLEN_T
# define SOCKLEN_T socklen_t
+# endif
#endif
do {
char h[NI_MAXHOST],s[NI_MAXSERV];
.....
--
Tim Rice Multitalents (707) 887-1469
[email protected]
--- openssl-1.0.0/Configure.old 2009-02-19 01:43:18.000000000 -0800
+++ openssl-1.0.0/Configure 2009-04-02 14:28:35.421293044 -0700
@@ -40,6 +40,9 @@
#
# --cross-compile-prefix Add specified prefix to binutils components.
#
+# --socklen_t For systems without socklen_t data type. Set to int or
+# size_t as appropriate for your platform.
+#
# no-hw-xxx do not compile support for specific crypto hardware.
# Generic OpenSSL-style methods relating to this support
# are always compiled but return NULL if the hardware
@@ -613,6 +616,7 @@
my $exe_ext="";
my $install_prefix="";
my $cross_compile_prefix="";
+my $socklen_t="";
my $no_threads=0;
my $threads=0;
my $no_shared=0; # but "no-shared" is default
@@ -834,6 +838,10 @@
{
$cross_compile_prefix=$1;
}
+ elsif (/^--socklen_t=(.*)$/)
+ {
+ $socklen_t=$1;
+ }
else
{
print STDERR $usage;
@@ -1371,6 +1379,11 @@
}
$cmll_obj=$cmll_enc unless ($cmll_obj =~ /.o$/);
+if ($socklen_t)
+ {
+ $cflags="$cflags -DSOCKLEN_T=$socklen_t";
+ }
+
# "Stringify" the C flags string. This permits it to be made part of a string
# and works as well on command lines.
$cflags =~ s/([\\\"])/\\\1/g;
--- openssl-1.0.0/crypto/bio/b_sock.c.old 2008-01-03 14:43:01.000000000
-0800
+++ openssl-1.0.0/crypto/bio/b_sock.c 2009-04-02 14:02:28.116173005 -0700
@@ -811,7 +811,9 @@
# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_BEOS_BONE) ||
defined(OPENSSL_SYS_MSDOS)
# define SOCKLEN_T size_t
# else
+# ifndef SOCKLEN_T
# define SOCKLEN_T socklen_t
+# endif
#endif
do {
char h[NI_MAXHOST],s[NI_MAXSERV];