diff options
author | Benny Prijono <bennylp@teluu.com> | 2011-08-30 01:45:07 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2011-08-30 01:45:07 +0000 |
commit | 88e2a696e8b881f070db3f66772957f0a90008a1 (patch) | |
tree | 1488c632c3cfd9c9bc9fbd270e96bb8de13982c5 /pjlib | |
parent | a7c18fd446d21dc91983351eb51d0632bc59d67d (diff) |
Configurable pj_sockaddr_in padding/sin_zero length. This closes #1359
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3741 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib')
-rw-r--r-- | pjlib/include/pj/sock.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pjlib/include/pj/sock.h b/pjlib/include/pj/sock.h index 88152c05..83d35db9 100644 --- a/pjlib/include/pj/sock.h +++ b/pjlib/include/pj/sock.h @@ -493,6 +493,13 @@ typedef struct pj_in_addr */ #define PJ_INET6_ADDRSTRLEN 46 +/** + * The size of sin_zero field in pj_sockaddr_in structure. Most OSes + * use 8, but others such as the BSD TCP/IP stack in eCos uses 24. + */ +#ifndef PJ_SOCKADDR_IN_SIN_ZERO_LEN +# define PJ_SOCKADDR_IN_SIN_ZERO_LEN 8 +#endif /** * This structure describes Internet socket address. @@ -512,7 +519,7 @@ struct pj_sockaddr_in #endif pj_uint16_t sin_port; /**< Transport layer port number. */ pj_in_addr sin_addr; /**< IP address. */ - char sin_zero[8]; /**< Padding. */ + char sin_zero[PJ_SOCKADDR_IN_SIN_ZERO_LEN]; /**< Padding.*/ }; |