Fix missing/wrong includes for BSD

Fix a few missing includes that prevented building on BSD systems.

* Client: the proper way to get MAXHOSTNAMELEN is from <sys/param.h>,
  not from <rpc/types.h>.

* Positioner/Direction: std::hash is declared in <functional>.

* Positioner/OutputNetworkSocket: get struct sockaddr from
  <sys/socket.h>, not from <netinet/in.h>.
This commit is contained in:
Matteo Cypriani 2016-11-03 16:54:17 -04:00
parent c6e39f7e70
commit dce4416bc6
3 changed files with 3 additions and 2 deletions

View File

@ -33,7 +33,7 @@
#include <signal.h>
#include <net/if.h>
#include <rpc/types.h> // for MAXHOSTNAMELEN
#include <sys/param.h> // for MAXHOSTNAMELEN
/* Number of packets to send */

View File

@ -15,6 +15,7 @@
#ifndef _OWLPS_POSITIONING_DIRECTION_HH_
#define _OWLPS_POSITIONING_DIRECTION_HH_
#include <functional> // for std::hash
#include <string>
/// Represents a direction in which a mobile is when it sends a

View File

@ -20,7 +20,7 @@
#include <string>
#include <stdint.h> // <cstdint> is not C++ 98 compliant
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h> // for struct sockaddr
/// Parent class for all output media that use network sockets
class OutputNetworkSocket: public OutputMedium