Skip to content

Commit 432db52

Browse files
committed
POSIX compliance (minor improvements)
1 parent b8eff9b commit 432db52

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

rxp/url.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
1313
/* */
1414
/*************************************************************************/
15+
#define _POSIX_C_SOURCE 200809L
1516
#ifdef FOR_LT
1617

1718
#include "lt-defs.h"
@@ -547,7 +548,7 @@ static FILE16 *http_open(const char *url,
547548
addr.sin_family = AF_INET;
548549
/* If we were really enthusiastic, we would try all the host's addresses */
549550
memcpy(&addr.sin_addr, hostent->h_addr_list[0], hostent->h_length);
550-
addr.sin_port = htons((u_short)(port == -1 ? 80 : port));
551+
addr.sin_port = htons((uint16_t)(port == -1 ? 80 : port));
551552

552553
/* Connect */
553554

siod/el_sys_unix.c

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
**
4242
** Unix system-dependant routines for editline library.
4343
*/
44+
#define _POSIX_C_SOURCE 200809L
4445
#include "editline.h"
4546

4647
#include <unistd.h>

0 commit comments

Comments
 (0)