mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-15 23:50:44 +00:00
56 lines
1.6 KiB
Plaintext
56 lines
1.6 KiB
Plaintext
|
--- src/ServerInterface.C.orig Sun Feb 27 12:09:00 2000
|
||
|
+++ src/ServerInterface.C Sun Feb 27 12:13:13 2000
|
||
|
@@ -48,6 +48,9 @@
|
||
|
#include <errno.h>
|
||
|
|
||
|
#include <sys/times.h>
|
||
|
+#ifdef __FreeBSD__
|
||
|
+#include <sys/param.h>
|
||
|
+#endif
|
||
|
|
||
|
#include "DLList.h" // Doubly linked lists
|
||
|
|
||
|
@@ -230,9 +233,15 @@
|
||
|
socket_service = -1;
|
||
|
while (socket_service == -1) {
|
||
|
// wait for connection
|
||
|
+#if defined(__FreeBSD__) && (__FreeBSD_version >= 400013)
|
||
|
+ socket_service = accept(socket_ecoute,
|
||
|
+ (struct sockaddr *) &address,
|
||
|
+ (socklen_t *) &lg_address);
|
||
|
+#else
|
||
|
socket_service = accept(socket_ecoute,
|
||
|
(struct sockaddr *) &address,
|
||
|
&lg_address);
|
||
|
+#endif
|
||
|
|
||
|
// Reception d'un signal (probablement SIGCHLD)
|
||
|
if(socket_service == -1 && errno == EINTR) {
|
||
|
@@ -305,8 +314,8 @@
|
||
|
} else if (strcmp(line, "p") == 0) { // pause
|
||
|
xpaused = !xpaused;
|
||
|
display_system_message(((xpaused)
|
||
|
- ? "Pausing...\n"
|
||
|
- : "Running...\n"));
|
||
|
+ ? (char *)"Pausing...\n"
|
||
|
+ : (char *)"Running...\n"));
|
||
|
continue;
|
||
|
} else if (strcmp(line, "-") == 0) { // slower...
|
||
|
if (debug) {
|
||
|
@@ -433,9 +442,15 @@
|
||
|
|
||
|
while (read_ready(socketnum)) {
|
||
|
|
||
|
+#if defined(__FreeBSD__) && (__FreeBSD_version >= 400013)
|
||
|
+ socket_service = accept(socketnum,
|
||
|
+ (struct sockaddr *) &address,
|
||
|
+ (socklen_t *) &lg_address);
|
||
|
+#else
|
||
|
socket_service = accept(socketnum,
|
||
|
(struct sockaddr *) &address,
|
||
|
&lg_address);
|
||
|
+#endif
|
||
|
|
||
|
// s'il y a une erreur, ce n'est pas une EINTR (cf appel a read_ready())
|
||
|
if(socket_service == -1) {
|