Backport of svn revision 504:

SF Patch Tracker [ 2969188 ] 1.8.0: patch for FreeBSD compilation
	Submitted By: Nick Leverton (leveret)
	Fix the order of header inclusion for FreeBSD.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@509 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez
2010-03-21 15:42:40 +00:00
parent 9226dd833b
commit 5eb55e0fb2
9 changed files with 386 additions and 346 deletions

View File

@@ -38,6 +38,10 @@
* \file
*/
#if !defined(WIN32)
#include <sys/param.h>
#endif
#include "UpnpGlobal.h" /* for */
#include "UpnpInet.h"
@@ -48,6 +52,9 @@
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#if defined(BSD)
#include <sys/socket.h>
#endif
#include <sys/types.h>
#include <time.h>
@@ -131,7 +138,7 @@ typedef struct HOSTPORT {
/*! Full host port. */
token text;
/* Network Byte Order */
struct sockaddr_in IPv4address;
struct sockaddr_storage IPaddress;
} hostport_type;
@@ -280,22 +287,6 @@ int token_cmp(
token *in2);
/*!
* \brief Parses a port (i.e. '4000') and converts it into a network ordered
* unsigned short int.
*
* \return
*/
int parse_port(
/*! [in] Sets a maximum limit. */
int max,
/*! [in] Port to be parsed. */
const char *port,
/*! [out] Output parameter where the port is parsed and converted into
* network format. */
unsigned short int *out);
/*!
* \brief Parses a string representing a host and port (e.g. "127.127.0.1:80"
* or "localhost") and fills out a hostport_type struct with internet address