python/gst-python: update to 1.24.11
[oi-userland.git] / components / network / vpnc / patches / 01-patch-vpnc-solaris-kazuyoshi.patch
blob45fe5c4d7c23bcf14cdb9620d51ad9fd613f9689
1 Pulled from https://raw.githubusercontent.com/kaizawa/patch-vpnc-solaris/master/patch-vpnc-solaris on 2016-11-17 (original commit 2012-07-28).
2 Posted by kazuyoshi :
4 This is a patch for vpnc 0.5.3 for Solaris 11.
6 https://github.com/kaizawa/patch-vpnc-solaris
7 Kazuyoshi Aizawa <admin2@whiteboard.ne.jp>
9 How To Apply
10 -------------
12 Copy patch file to the directory you exetracted vpnc 0.5.3.
13 Then run patch command.
15 sol11 $ cd vpnc-0.5.3
16 sol11 $ patch -p1 < patch-vpnc-solaris
17 patching file config.c
18 patching file sysdep.c
19 patching file tunip.c
20 patching file vpnc.c
22 diff --git a/config.c b/config.c
23 index c12b09e..972768f 100644
24 --- a/config.c
25 +++ b/config.c
26 @@ -35,6 +35,9 @@
27 #include "vpnc.h"
28 #include "supp.h"
29 #include "decrypt-utils.h"
30 +#if defined(__sun__)
31 +#include <strings.h>
32 +#endif
34 const char *config[LAST_CONFIG];
36 diff --git a/sysdep.c b/sysdep.c
37 index ff07753..540648f 100644
38 --- a/sysdep.c
39 +++ b/sysdep.c
40 @@ -527,7 +527,7 @@ int tun_write(int fd, unsigned char *buf, int len)
42 struct strbuf sbuf;
43 sbuf.len = len;
44 - sbuf.buf = buf;
45 + sbuf.buf = (char *)buf;
46 return putmsg(fd, NULL, &sbuf, 0) >= 0 ? sbuf.len : -1;
49 @@ -537,7 +537,7 @@ int tun_read(int fd, unsigned char *buf, int len)
50 int f = 0;
52 sbuf.maxlen = len;
53 - sbuf.buf = buf;
54 + sbuf.buf = (char *)buf;
55 return getmsg(fd, NULL, &sbuf, &f) >= 0 ? sbuf.len : -1;
57 #elif defined(__CYGWIN__)
58 @@ -680,7 +680,11 @@ int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr)
59 return -1;
62 +#if defined(__sun__)
63 + memcpy(hwaddr, &ifr.ifr_addr.sa_data, ETH_ALEN);
64 +#else
65 memcpy(hwaddr, &ifr.ifr_hwaddr.sa_data, ETH_ALEN);
66 +#endif
68 return 0;
69 #else
70 diff --git a/vpnc.c b/vpnc.c
71 index 38dc17f..421c29b 100644
72 --- a/vpnc.c
73 +++ b/vpnc.c
74 @@ -39,6 +39,10 @@
75 #include <sys/utsname.h>
77 #include <gcrypt.h>
78 +#if defined(__sun__)
79 +#include <fcntl.h>
80 +#include <sys/types.h>
81 +#endif
83 #ifdef OPENSSL_GPL_VIOLATION
84 /* OpenSSL */
85 diff --git a/tunip.c b/tunip.c
86 index d076924..20f1309 100644
87 --- a/tunip.c
88 +++ b/tunip.c
89 @@ -1058,7 +1058,11 @@ void vpnc_doit(struct sa_block *s)
91 _exit(0);
93 +#if defined(__sun__)
94 + openlog("vpnc", LOG_PID, LOG_DAEMON);
95 +#else
96 openlog("vpnc", LOG_PID | LOG_PERROR, LOG_DAEMON);
97 +#endif
98 logmsg = syslog;
99 } else {
100 printf("VPNC started in foreground...\n");