[stunnel-users] Still having issues compiling Stunnel on aix 5.3. SOL_TCP not defined? Please help

Geoff geoff.kozens at telusplanet.net
Wed Dec 2 06:22:18 CET 2009


I installed gcc and the latest version of openssl on my aix 5.3 server.
I did the ./configure and all went well.
When I did the make I recieved the following error.


        if gcc -DPACKAGE_NAME=\"stunnel\" -DPACKAGE_TARNAME=\"stunnel\"
-DPACKAGE_VERSION=\"4.28\" 
-DPACKAGE_STRING=\"stunnel\ 4.28\" -DPACKAGE_BUGREPORT=\"\"
-DPACKAGE=\"stunnel\" -DVERSION=\"4.28\" 
-DHOST=\"powerpc-ibm-aix5.3.0.0\" -DCPU_POWERPC=1 -DVENDOR_IBM=1
-DOS_AIX5_3_0_0=1 -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 
-DSIZEOF_UNSIGNED_CHAR=1 -DSIZEOF_UNSIGNED_SHORT=2 -DSIZEOF_UNSIGNED_INT=4
-DSIZEOF_UNSIGNED_LONG=4 
-DHAVE_DEV_PTS_AND_PTC=1 -DRANDOM_FILE=\"/dev/urandom\" -DHAVE_UCONTEXT_H=1
-DHAVE_PTHREAD_H=1 
-DHAVE_SYS_SELECT_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1
-DHAVE_SYS_IOCTL_H=1 -DHAVE_STROPTS_H=1 
-DHAVE_GRP_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_RESOURCE_H=1
-DHAVE_SYS_SOCKET_H=1 
-DHAVE_STRUCT_MSGHDR_MSG_CONTROL=1 -DHAVE_MSGHDR_MSG_CONTROL=1
-DHAVE_LIBDL=1 
-DHAVE_LIBZ=1 -DHAVE_LIBPTHREAD=1 -DUSE_PTHREAD=1 -DHAVE_SNPRINTF=1
-DHAVE_VSNPRINTF=1 -DHAVE_WAITPID=1 
-DHAVE_WAIT4=1 -DHAVE_SETSID=1 -DHAVE_SETGROUPS=1 -DHAVE_CHROOT=1
-DHAVE_SYSCONF=1 -DHAVE_GETRLIMIT=1 
-DHAVE_PTHREAD_SIGMASK=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GETCONTEXT=1
-DHAVE_POLL=1 -DHAVE_ENDHOSTENT=1 
-DHAVE_GETNAMEINFO=1 -DHAVE_GETADDRINFO=1 -DHAVE_OPENSSL=1 -Dssldir=\"/usr\"
-DHAVE_OSSL_ENGINE_H=1 
-DUSE_IPv6=1 -I. -I. -I/usr/kerberos/include
-DLIBDIR='"/usr/local/lib/stunnel"' 
-DCONFDIR='"/usr/local/etc/stunnel"'
-DPIDFILE='"/usr/local/var/run/stunnel/stunnel.pid"'    
-g -O2 -Wall -Wshadow -Wcast-align -Wpointer-arith -I/usr/include -MT
options.o -MD -MP -MF ".deps/options.
Tpo" -c -o options.o options.c;  then mv -f ".deps/options.Tpo"
".deps/options.Po"; 
else rm -f ".deps/options.Tpo"; exit 1; fi

options.c:1773: error: 'SOL_TCP' undeclared here (not in a function)
make: 1254-004 The error code from the last command is 1.
 
 
Stop.
make: 1254-004 The error code from the last command is 1.


The SOL_TCP option is not defined on AIX. 
I am hoping this can be applied to SOL_SOCKET which is defined.

So...
I changed the following lines in the options.c program

#ifdef TCP_KEEPCNT
/*    {"TCP_KEEPCNT",     SOL_TCP,     TCP_KEEPCNT,     TYPE_INT,
DEF_VALS}, */
    {"TCP_KEEPCNT",     SOL_SOCKET,  TCP_KEEPCNT,     TYPE_INT,
DEF_VALS}, 
#endif
#ifdef TCP_KEEPIDLE
/*    {"TCP_KEEPIDLE",    SOL_TCP,     TCP_KEEPIDLE,    TYPE_INT,
DEF_VALS}, */
    {"TCP_KEEPIDLE",    SOL_SOCKET,  TCP_KEEPIDLE,    TYPE_INT,
DEF_VALS}, 
#endif
#ifdef TCP_KEEPINTVL
/*    {"TCP_KEEPINTVL",   SOL_TCP,     TCP_KEEPINTVL,   TYPE_INT,
DEF_VALS},*/
    {"TCP_KEEPINTVL",   SOL_SOCKET,  TCP_KEEPINTVL,   TYPE_INT,
DEF_VALS}, 

I can compile the code without error at this point.
So... my question is has anyone else made a similar change to get the code
to compile on AIX 5.3?

If not, can you please tell me what configuration options you used to make
stunnel work.

Thanks for any help you can provide.
I am at my wits end here and pretty much my capability in compiling code.

Thanks in advance,

Geoff

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20091201/d91a92a6/attachment.html>


More information about the stunnel-users mailing list