mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Added some consts for arguments in network.c declarations. Moved
php_sockaddr_storage to php_network.h and added check for struct sockaddr_storage
This commit is contained in:
parent
350777932a
commit
6e1878b0fc
5 changed files with 22 additions and 9 deletions
|
@ -41,10 +41,18 @@
|
|||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SOCKADDR_STORAGE
|
||||
typedef struct sockaddr_storage php_sockaddr_storage;
|
||||
#else
|
||||
typedef struct {
|
||||
unsigned short ss_family;
|
||||
char info[256];
|
||||
} php_sockaddr_storage;
|
||||
#endif
|
||||
|
||||
|
||||
int php_hostconnect(char *host, unsigned short port, int socktype, int timeout);
|
||||
PHPAPI int php_connect_nonb(int sockfd, struct sockaddr *addr, socklen_t addrlen, struct timeval *timeout);
|
||||
int php_hostconnect(const char *host, unsigned short port, int socktype, int timeout);
|
||||
PHPAPI int php_connect_nonb(int sockfd, const struct sockaddr *addr, socklen_t addrlen, struct timeval *timeout);
|
||||
|
||||
#endif /* _PHP_NETWORK_H */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue