added support for CuBox (http://www.solid-run.com)
[deb_libcec.git] / src / lib / platform / posix / os-types.h
index 2b6c50f8262499761aef11668829312d9dcc96ec..261dd035e6d6efdf893d0423c3a69cf5c1edbbc9 100644 (file)
  */
 
 #define _FILE_OFFSET_BITS 64
+#include <unistd.h>
 #include <string.h>
 #include <errno.h>
 #include <sys/time.h>
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
 #include <sys/prctl.h>
 #endif
 #include <pthread.h>
 #include <semaphore.h>
 #include <stdint.h>
 
+extern "C" {
+#include <sys/types.h>
+}
+
 #define LIBTYPE
 #define DECLSPEC
 
 typedef int socket_t;
-#define INVALID_SOCKET (-1)
-#define SOCKET_ERROR   (-1)
+typedef socket_t tcp_socket_t;
+#define INVALID_SOCKET_VALUE        (-1)
+typedef socket_t serial_socket_t;
+#define INVALID_SERIAL_SOCKET_VALUE (-1)
+typedef socket_t chardev_socket_t;
+#define INVALID_CHARDEV_SOCKET_VALUE (-1)