diff options
author | Kostadin Damyanov <maxmight@gmail.com> | 2015-05-25 03:49:24 +0300 |
---|---|---|
committer | Kostadin Damyanov <maxmight@gmail.com> | 2015-05-25 03:49:24 +0300 |
commit | 4e07a2dea8c94337702d35d0d02d4b7234f86e29 (patch) | |
tree | a12a04e950dc1846a7e804b1e1a8bfa9b9c8e37a /drivers | |
parent | 4a56f72f5be6cd34c96a082e3697f4eecd744e75 (diff) | |
download | redot-engine-4e07a2dea8c94337702d35d0d02d4b7234f86e29.tar.gz |
Haiku: fix building with UNIX_ENABLED.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/unix/packet_peer_udp_posix.cpp | 6 | ||||
-rw-r--r-- | drivers/unix/stream_peer_tcp_posix.cpp | 9 | ||||
-rw-r--r-- | drivers/unix/tcp_server_posix.cpp | 6 |
3 files changed, 17 insertions, 4 deletions
diff --git a/drivers/unix/packet_peer_udp_posix.cpp b/drivers/unix/packet_peer_udp_posix.cpp index 26a0b29228..94b4c35923 100644 --- a/drivers/unix/packet_peer_udp_posix.cpp +++ b/drivers/unix/packet_peer_udp_posix.cpp @@ -13,7 +13,11 @@ #include <stdio.h> #ifndef NO_FCNTL -#include <sys/fcntl.h> + #ifdef __HAIKU__ + #include <fcntl.h> + #else + #include <sys/fcntl.h> + #endif #else #include <sys/ioctl.h> #endif diff --git a/drivers/unix/stream_peer_tcp_posix.cpp b/drivers/unix/stream_peer_tcp_posix.cpp index 2301d8b6c4..2db7d9f6ec 100644 --- a/drivers/unix/stream_peer_tcp_posix.cpp +++ b/drivers/unix/stream_peer_tcp_posix.cpp @@ -39,7 +39,11 @@ #include <netdb.h> #include <sys/types.h> #ifndef NO_FCNTL -#include <sys/fcntl.h> + #ifdef __HAIKU__ + #include <fcntl.h> + #else + #include <sys/fcntl.h> + #endif #else #include <sys/ioctl.h> #endif @@ -202,7 +206,8 @@ Error StreamPeerTCPPosix::write(const uint8_t* p_data,int p_bytes, int &r_sent, while (data_to_send) { - int sent_amount = send(sockfd, offset, data_to_send, MSG_NOSIGNAL); + // TODO: handle MSG_NOSIGNAL on __HAIKU__ + int sent_amount = send(sockfd, offset, data_to_send, 0); //printf("Sent TCP data of %d bytes, errno %d\n", sent_amount, errno); if (sent_amount == -1) { diff --git a/drivers/unix/tcp_server_posix.cpp b/drivers/unix/tcp_server_posix.cpp index 4f9ee62cde..aaca0fe0d8 100644 --- a/drivers/unix/tcp_server_posix.cpp +++ b/drivers/unix/tcp_server_posix.cpp @@ -41,7 +41,11 @@ #include <netdb.h> #include <sys/types.h> #ifndef NO_FCNTL -#include <sys/fcntl.h> + #ifdef __HAIKU__ + #include <fcntl.h> + #else + #include <sys/fcntl.h> + #endif #else #include <sys/ioctl.h> #endif |