Some System V based systems, notably Solaris 2.X, redefined some of the standard socket constants. Since these were constant across all architectures, they were often hardwired into the perl code. The ``proper'' way to deal with this is to make sure that you run h2ph against sys/socket.h, require that file and use the symbolic names (SOCK_STREAM, SOCK_DGRAM, SOCK_RAW, SOCK_RDM, and SOCK_SEQPACKET).
Note that even though SunOS 4 and SunOS 5 are binary compatible, these values are different, and require a different socket.ph for each OS.
Under version 5, you can also ``use Socket'' to get the proper values.
Other resources at this site: