FreeRDP/FreeRDP — Issue #320: Build broken due to include dependencies in FreeBSD.
Author: caladri
Created: 2011-12-31 08:22:36+00:00
State: open

The file must be included before , and must be included for struct sockaddr_in.

```diff --git a/libfreerdp-core/listener.c b/libfreerdp-core/listener.c
index c314c53..381cee3 100644
--- a/libfreerdp-core/listener.c
+++ b/libfreerdp-core/listener.c
@@ -25,11 +25,19 @@

#ifndef _WIN32
#include
+#ifdef __FreeBSD__
+#include
+#endif
#include
#include
#include
+#ifndef __FreeBSD__
#include
+#endif
#include
+#ifdef __FreeBSD__
+#include
+#endif
#else
#define close(_fd) closesocket(_fd)
#endif
diff --git a/libfreerdp-core/tcp.c b/libfreerdp-core/tcp.c
index d4e6fc8..6fa11cd 100644
--- a/libfreerdp-core/tcp.c
+++ b/libfreerdp-core/tcp.c
@@ -27,10 +27,15 @@

#ifndef _WIN32
#include
+#ifdef __FreeBSD__
+#include
+#endif
#include
#include
#include
+#ifndef __FreeBSD__
#include
+#endif
#include
#include

```