You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Haiku: fix building with UNIX_ENABLED.
This commit is contained in:
@@ -13,7 +13,11 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifndef NO_FCNTL
|
#ifndef NO_FCNTL
|
||||||
#include <sys/fcntl.h>
|
#ifdef __HAIKU__
|
||||||
|
#include <fcntl.h>
|
||||||
|
#else
|
||||||
|
#include <sys/fcntl.h>
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -39,7 +39,11 @@
|
|||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#ifndef NO_FCNTL
|
#ifndef NO_FCNTL
|
||||||
#include <sys/fcntl.h>
|
#ifdef __HAIKU__
|
||||||
|
#include <fcntl.h>
|
||||||
|
#else
|
||||||
|
#include <sys/fcntl.h>
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -202,7 +206,8 @@ Error StreamPeerTCPPosix::write(const uint8_t* p_data,int p_bytes, int &r_sent,
|
|||||||
|
|
||||||
while (data_to_send) {
|
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);
|
//printf("Sent TCP data of %d bytes, errno %d\n", sent_amount, errno);
|
||||||
|
|
||||||
if (sent_amount == -1) {
|
if (sent_amount == -1) {
|
||||||
|
|||||||
@@ -41,7 +41,11 @@
|
|||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#ifndef NO_FCNTL
|
#ifndef NO_FCNTL
|
||||||
#include <sys/fcntl.h>
|
#ifdef __HAIKU__
|
||||||
|
#include <fcntl.h>
|
||||||
|
#else
|
||||||
|
#include <sys/fcntl.h>
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -34,9 +34,11 @@ def configure(env):
|
|||||||
env["bits"]="32"
|
env["bits"]="32"
|
||||||
|
|
||||||
env.Append(CPPPATH = ['#platform/haiku'])
|
env.Append(CPPPATH = ['#platform/haiku'])
|
||||||
|
|
||||||
|
# TODO: add clang and try gcc2 too
|
||||||
env["CC"] = "gcc-x86"
|
env["CC"] = "gcc-x86"
|
||||||
env["CXX"] = "g++-x86"
|
env["CXX"] = "g++-x86"
|
||||||
env.Append(CPPFLAGS = ['-DDEBUG_METHODS_ENABLED'])
|
|
||||||
|
|
||||||
|
env.Append(CPPFLAGS = ['-DDEBUG_METHODS_ENABLED'])
|
||||||
env.Append(CPPFLAGS = ['-DUNIX_ENABLED'])
|
env.Append(CPPFLAGS = ['-DUNIX_ENABLED'])
|
||||||
#env.Append(LIBS = ['be'])
|
env.Append(LIBS = ['be'])
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#include "os_haiku.h"
|
||||||
|
|
||||||
|
String OS_Haiku::get_name() {
|
||||||
|
return "Haiku";
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user