update Sat Sep 12 12:37:01 PDT 2009
[pkgsrc.git] / wip / eciadsl-usermode / patches / patch-ag
1 $NetBSD$
2
3 --- pppoeci.c.orig      2003-10-15 11:15:32.000000000 +0200
4 +++ pppoeci.c
5 @@ -136,6 +136,9 @@ Manufacturer: GlobeSpan Inc. Product: US
6  #include <linux/if_tun.h>
7  #include <linux/if.h>
8  #endif
9 +#ifdef __NetBSD__
10 +#include <libgen.h>
11 +#endif
12  
13  #include "util.h"
14  /* my USB library */
15 @@ -1716,7 +1719,10 @@ int main(int argc, char** argv)
16         {
17                 int sbuf, ss = sizeof(sbuf);
18  
19 -               if (getsockopt(fdin, SOL_SOCKET, SO_SNDBUF, &sbuf, &ss) == 0)
20 +               if (getsockopt(fdin, 
21 +                               SOL_SOCKET, 
22 +                               SO_SNDBUF, 
23 +                               &sbuf, (socklen_t *)&ss) == 0)
24                 {
25  
26                         /* debug message */
27 @@ -1738,7 +1744,10 @@ int main(int argc, char** argv)
28  
29                 }
30  
31 -               if (getsockopt(fdin, SOL_SOCKET, SO_RCVBUF, &sbuf, &ss) == 0)
32 +               if (getsockopt(fdin, 
33 +                               SOL_SOCKET, 
34 +                               SO_RCVBUF, 
35 +                               &sbuf, (socklen_t *)&ss) == 0)
36                 {
37                         /* debug message */
38                         if (verbose > 1)
39 @@ -1754,7 +1763,7 @@ int main(int argc, char** argv)
40                         if (setsockopt(fdin, SOL_SOCKET, SO_RCVBUF, &sbuf, ss) < 0 && verbose)
41                         {
42                                 snprintf(errText, ERR_BUFSIZE,
43 -                                               "setsockopt failed",
44 +                                               "setsockopt failed: %d",
45                                                 this_process);
46                                 message(errText);
47                                 perror("reason");