Changeset 187 in Main for trunk/Server/server.c
- Timestamp:
- Sep 28, 2024, 9:07:34 AM (7 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/server.c
r183 r187 43 43 #else 44 44 #ifdef USE_POLL 45 #ifdef __PPU__ 46 #include <net/poll.h> 47 #else 45 48 #include <poll.h> 49 #endif 46 50 #else 47 51 #include <sys/select.h> … … 50 54 #include <arpa/inet.h> 51 55 #include <netinet/in.h> 56 #ifndef __PPU__ 52 57 #include <netinet/tcp.h> 58 #endif 53 59 #ifndef NO_GETADDRINFO 54 60 #include <netdb.h> … … 136 142 return 1; 137 143 } 144 #ifndef __PPU__ 138 145 if(setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void*)&yes, sizeof(yes)) < 0) { 139 146 close_socket(sock); … … 141 148 return 1; 142 149 } 150 #endif 143 151 #ifndef NO_IPV6 144 152 int no = 0; … … 431 439 #elif defined(__HAIKU__) 432 440 int32_t tw_server_pass(void* ptr) { 433 #elif defined(_PSP) 441 #elif defined(_PSP) || defined(__PPU__) 434 442 int tw_server_pass(void* ptr) { 435 443 #endif 436 #if defined(__HAIKU__) || defined(__MINGW32__) || defined(_PSP) 444 #if defined(__HAIKU__) || defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) 437 445 int sock = ((struct pass_entry*)ptr)->sock; 438 446 bool ssl = ((struct pass_entry*)ptr)->ssl; … … 514 522 struct tm tm; 515 523 strptime(req.headers[i + 1], "%a, %d %b %Y %H:%M:%S GMT", &tm); 516 #if defined(__MINGW32__) || defined(_PSP) 524 #if defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) 517 525 time_t t = 0; 518 526 struct tm* btm = localtime(&t); … … 919 927 int sock = accept(sockets[i], (struct sockaddr*)&claddr, &clen); 920 928 cm_log("Server", "New connection accepted"); 921 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_PSP) 929 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_PSP) || defined(__PPU__) 922 930 struct pass_entry* e = malloc(sizeof(*e)); 923 931 e->sock = sock; … … 945 953 } 946 954 } 947 #elif defined(_PSP) 955 #elif defined(_PSP) || defined(__PPU__) 948 956 tw_server_pass(e); 949 957 #elif defined(__HAIKU__)
Note:
See TracChangeset
for help on using the changeset viewer.