IBM Support

Errors compiling FTP User Exit sample FTPOSTPR

Troubleshooting


Problem

Compile errors trying to compile the FTP User Exit sample FTPOSTPR, provided in the SEZAINST library. Compile errors are generated for IPv6 structures.

Cause

The following errors may occur when compiling the FTP User Exit sample FTPOSTPR:

    INFORMATIONAL CBC3310 :
      The type "struct sockaddr_storage" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
    ERROR CBC3045 :
      Undeclared identifier INET6_ADDRSTRLEN.
    ERROR CBC3285 :
      The indirection operator cannot be applied to a pointer to an incomplete struct or union.
    ERROR CBC3045 :
      Undeclared identifier INET_ADDRSTRLEN.
    ERROR CBC3244 :
      External variable SOCK_DEB cannot be redefined.
    ERROR CBC3244 :
      External variable SOCK_DO_ cannot be redefined.
    ERROR CBC3244 :
      External variable INET_NET cannot be redefined.
    ERROR CBC3244 :
      External variable INET_NTO cannot be redefined.
    ERROR CBC3285 :
      The indirection operator cannot be applied to a pointer to an incomplete struct or union.
    ERROR CBC3045 :
      Undeclared identifier AF_INET6.
    WARNING CBC3068 :
      Operation between types "const unsigned char*" and "int" is not allowed.
    ERROR CBC3285 :
      The indirection operator cannot be applied to a pointer to an incomplete struct or union.
    ERROR CBC3285 :
      The indirection operator cannot be applied to a pointer to an incomplete struct or union.

These errors occur because _OPEN_SYS_SOCK_IPV6 is not defined.

Resolving The Problem

Add the following to the FTPOSTPR source code, after statement

#pragma linkage(FTPOSTPR, fetchable):

    #if !defined(_OPEN_SYS_SOCK_IPV6)
      #define _OPEN_SYS_SOCK_IPV6
    #endif
NOTE: This has been corrected in the samples for release 1.8 and above.
[{"Product":{"code":"SSSN3L","label":"z\/OS Communications Server"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"All","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"1.6;1.7","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

More support for:
z/OS Communications Server

Software version:
1.6, 1.7

Operating system(s):
z/OS

Document number:
346179

Modified date:
15 June 2018

UID

swg21229210