1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
*** broadcast.c.orig Mon May 17 03:46:22 1993
--- broadcast.c Sat Sep 18 15:07:04 1999
***************
*** 68,74 ****
--- 68,76 ----
#include <sys/time.h>
#include <sys/stat.h>
+ #ifndef __FreeBSD__
extern long time();
+ #endif
#ifdef SUNHACKS
#include <sys/sockio.h> /* For SIOCGIF* */
***************
*** 490,496 ****
for (i = 0; i < nbcaddr; i++) {
/* Send data packets to all bcast ports */
if (sendto(s, real_buf, HEADERSIZE+n, 0,
! &bcaddr[i], sizeof bcaddr[i]) !=
HEADERSIZE+n) {
perror("sendto");
}
--- 492,498 ----
for (i = 0; i < nbcaddr; i++) {
/* Send data packets to all bcast ports */
if (sendto(s, real_buf, HEADERSIZE+n, 0,
! (struct sockaddr *)&bcaddr[i], sizeof bcaddr[i]) !=
HEADERSIZE+n) {
perror("sendto");
}
***************
*** 522,528 ****
if (select(ctls+1, &inputav, 0, 0, &zerotime) == 1) {
ctlsinsize = sizeof(ctlsin);
n = recvfrom(ctls, buf, BUFFERSIZE, 0,
! &ctlsin, &ctlsinsize);
if (n < 0) {
perror("recvfrom");
exit(1);
--- 524,530 ----
if (select(ctls+1, &inputav, 0, 0, &zerotime) == 1) {
ctlsinsize = sizeof(ctlsin);
n = recvfrom(ctls, buf, BUFFERSIZE, 0,
! (struct sockaddr *)&ctlsin, &ctlsinsize);
if (n < 0) {
perror("recvfrom");
exit(1);
|