diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/config-os400.h | 6 | ||||
-rw-r--r-- | lib/qssl.c | 6 | ||||
-rw-r--r-- | lib/qssl.h | 2 | ||||
-rw-r--r-- | lib/setup-os400.h | 16 |
4 files changed, 26 insertions, 4 deletions
diff --git a/lib/config-os400.h b/lib/config-os400.h index 5e30e435d..edc398768 100644 --- a/lib/config-os400.h +++ b/lib/config-os400.h @@ -322,6 +322,9 @@ /* Define if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H +/* Define if you have the <sys/un.h> header file. */ +#define HAVE_SYS_UN_H + /* Define if you have the <sys/ioctl.h> header file. */ #define HAVE_SYS_IOCTL_H @@ -379,6 +382,9 @@ #define SIZEOF_CURL_OFF_T 8 +/* Define this if you have struct sockaddr_storage */ +#define HAVE_STRUCT_SOCKADDR_STORAGE + /* Define if you have the ANSI C header files. */ #define STDC_HEADERS diff --git a/lib/qssl.c b/lib/qssl.c index 15684096d..2dd46c35c 100644 --- a/lib/qssl.c +++ b/lib/qssl.c @@ -372,15 +372,15 @@ int Curl_qsossl_shutdown(struct connectdata * conn, int sockindex) } -ssize_t Curl_qsossl_send(struct connectdata * conn, int sockindex, void * mem, - size_t len) +ssize_t Curl_qsossl_send(struct connectdata * conn, int sockindex, + const void * mem, size_t len) { /* SSL_Write() is said to return 'int' while write() and send() returns 'size_t' */ int rc; - rc = SSL_Write(conn->ssl[sockindex].handle, mem, (int) len); + rc = SSL_Write(conn->ssl[sockindex].handle, (void *) mem, (int) len); if(rc < 0) { switch(rc) { diff --git a/lib/qssl.h b/lib/qssl.h index 55d72d4dc..ff3f6f56a 100644 --- a/lib/qssl.h +++ b/lib/qssl.h @@ -38,7 +38,7 @@ int Curl_qsossl_shutdown(struct connectdata * conn, int sockindex); ssize_t Curl_qsossl_send(struct connectdata * conn, int sockindex, - void * mem, + const void * mem, size_t len); ssize_t Curl_qsossl_recv(struct connectdata * conn, /* connection data */ int num, /* socketindex */ diff --git a/lib/setup-os400.h b/lib/setup-os400.h index 8466d9c43..d6e704ace 100644 --- a/lib/setup-os400.h +++ b/lib/setup-os400.h @@ -137,4 +137,20 @@ extern OM_uint32 Curl_gss_delete_sec_context_a(OM_uint32 * minor_status, #define ldap_first_attribute Curl_ldap_first_attribute_a #define ldap_next_attribute Curl_ldap_next_attribute_a +/* Some socket functions must be wrapped to process textual addresses + like AF_UNIX. */ + +extern int Curl_os400_connect(int sd, struct sockaddr * destaddr, int addrlen); +extern int Curl_os400_bind(int sd, struct sockaddr * localaddr, int addrlen); +extern int Curl_os400_sendto(int sd, char * buffer, int buflen, int flags, + struct sockaddr * dstaddr, int addrlen); +extern int Curl_os400_recvfrom(int sd, char * buffer, int buflen, int flags, + struct sockaddr * fromaddr, int * addrlen); + +#define connect Curl_os400_connect +#define bind Curl_os400_bind +#define sendto Curl_os400_sendto +#define recvfrom Curl_os400_recvfrom + + #endif /* __SETUP_OS400_H */ |