[Erp5-report] r45239 luke - in /slapos/trunk/patch: ./ ilm-patch/ kvm-patch/
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Apr 8 13:00:33 CEST 2011
Author: luke
Date: Fri Apr 8 13:00:33 2011
New Revision: 45239
URL: http://svn.erp5.org?rev=45239&view=rev
Log:
- local patches for external software
Added:
slapos/trunk/patch/
slapos/trunk/patch/ilm-patch/
slapos/trunk/patch/ilm-patch/ilmbase.diff
slapos/trunk/patch/ilm-patch/openexr.diff
slapos/trunk/patch/kvm-patch/
slapos/trunk/patch/kvm-patch/ipv6.patch
Added: slapos/trunk/patch/ilm-patch/ilmbase.diff
URL: http://svn.erp5.org/slapos/trunk/patch/ilm-patch/ilmbase.diff?rev=45239&view=auto
==============================================================================
--- slapos/trunk/patch/ilm-patch/ilmbase.diff (added)
+++ slapos/trunk/patch/ilm-patch/ilmbase.diff [utf8] Fri Apr 8 13:00:33 2011
@@ -0,0 +1,11 @@
+diff -ru ilmbase-1.0.2.org/Imath/ImathMatrix.h ilmbase-1.0.2/Imath/ImathMatrix.h
+--- ilmbase-1.0.2.org/Imath/ImathMatrix.h 2010-07-17 00:48:40.000000000 +0200
++++ ilmbase-1.0.2/Imath/ImathMatrix.h 2011-01-25 10:04:38.000000000 +0100
+@@ -51,6 +51,7 @@
+
+ #include <iostream>
+ #include <iomanip>
++#include <string.h>
+
+ #if (defined _WIN32 || defined _WIN64) && defined _MSC_VER
+ // suppress exception specification warnings
Added: slapos/trunk/patch/ilm-patch/openexr.diff
URL: http://svn.erp5.org/slapos/trunk/patch/ilm-patch/openexr.diff?rev=45239&view=auto
==============================================================================
--- slapos/trunk/patch/ilm-patch/openexr.diff (added)
+++ slapos/trunk/patch/ilm-patch/openexr.diff [utf8] Fri Apr 8 13:00:33 2011
@@ -0,0 +1,11 @@
+diff -ru openexr-1.7.0.org/exrenvmap/blurImage.cpp openexr-1.7.0/exrenvmap/blurImage.cpp
+--- openexr-1.7.0.org/exrenvmap/blurImage.cpp 2009-02-26 00:39:27.000000000 +0100
++++ openexr-1.7.0/exrenvmap/blurImage.cpp 2011-01-25 10:16:14.000000000 +0100
+@@ -45,6 +45,7 @@
+ #include "Iex.h"
+ #include <iostream>
+ #include <algorithm>
++#include <cstring>
+
+ using namespace std;
+ using namespace Imf;
Added: slapos/trunk/patch/kvm-patch/ipv6.patch
URL: http://svn.erp5.org/slapos/trunk/patch/kvm-patch/ipv6.patch?rev=45239&view=auto
==============================================================================
--- slapos/trunk/patch/kvm-patch/ipv6.patch (added)
+++ slapos/trunk/patch/kvm-patch/ipv6.patch [utf8] Fri Apr 8 13:00:33 2011
@@ -0,0 +1,143 @@
+diff --git a/block/nbd.c b/block/nbd.c
+index c8dc763..b0835f0 100644
+--- a/block/nbd.c
++++ b/block/nbd.c
+@@ -81,22 +81,24 @@ static int nbd_open(BlockDriverState *bs, const char* filename, int flags)
+
+ } else {
+ uint16_t port = NBD_DEFAULT_PORT;
+- char *p, *r;
++ char *r;
+ char hostname[128];
++ const char *ipv6hostname;
++ char *running;
++ char *token;
++ const char delimiter1[] = "]";
++ const char delimiter2[] = ":";
+
+ pstrcpy(hostname, 128, host);
+-
+- p = strchr(hostname, ':');
+- if (p != NULL) {
+- *p = '\0';
+- p++;
+-
+- port = strtol(p, &r, 0);
+- if (r == p) {
+- goto out;
+- }
++ if (!strstart(hostname, "[", &ipv6hostname)) {
++ goto out;
+ }
+-
++ running = strdupa(ipv6hostname);
++ token = strsep(&running, delimiter1);
++ pstrcpy(hostname, 128, token);
++ token = strsep(&running, delimiter2);
++ token = strsep(&running, delimiter2);
++ port = strtol(token, &r, 0);
+ sock = tcp_socket_outgoing(hostname, port);
+ }
+
+diff --git a/nbd.c b/nbd.c
+index d8ebc42..d460bc8 100644
+--- a/nbd.c
++++ b/nbd.c
+@@ -65,6 +65,8 @@
+
+ #define NBD_OPT_EXPORT_NAME (1 << 0)
+
++static const int off=0;
++
+ /* That's all folks */
+
+ #define read_sync(fd, buffer, size) nbd_wr_sync(fd, buffer, size, true)
+@@ -110,15 +112,15 @@ size_t nbd_wr_sync(int fd, void *buffer, size_t size, bool do_read)
+ int tcp_socket_outgoing(const char *address, uint16_t port)
+ {
+ int s;
+- struct in_addr in;
+- struct sockaddr_in addr;
++ struct in6_addr in;
++ struct sockaddr_in6 addr;
+
+- s = socket(PF_INET, SOCK_STREAM, 0);
++ s = socket(PF_INET6, SOCK_STREAM, 0);
+ if (s == -1) {
+ return -1;
+ }
+
+- if (inet_aton(address, &in) == 0) {
++ if (inet_pton(AF_INET6, address, &in) == 0) {
+ struct hostent *ent;
+
+ ent = gethostbyname(address);
+@@ -129,9 +131,9 @@ int tcp_socket_outgoing(const char *address, uint16_t port)
+ memcpy(&in, ent->h_addr, sizeof(in));
+ }
+
+- addr.sin_family = AF_INET;
+- addr.sin_port = htons(port);
+- memcpy(&addr.sin_addr.s_addr, &in, sizeof(in));
++ addr.sin6_family = AF_INET6;
++ addr.sin6_port = htons(port);
++ memcpy(&addr.sin6_addr.s6_addr, &in, sizeof(in));
+
+ if (connect(s, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
+ goto error;
+@@ -146,16 +148,16 @@ error:
+ int tcp_socket_incoming(const char *address, uint16_t port)
+ {
+ int s;
+- struct in_addr in;
+- struct sockaddr_in addr;
++ struct in6_addr in;
++ struct sockaddr_in6 addr;
+ int opt;
+
+- s = socket(PF_INET, SOCK_STREAM, 0);
++ s = socket(PF_INET6, SOCK_STREAM, 0);
+ if (s == -1) {
+ return -1;
+ }
+
+- if (inet_aton(address, &in) == 0) {
++ if (inet_pton(AF_INET6, address, &in) == 0) {
+ struct hostent *ent;
+
+ ent = gethostbyname(address);
+@@ -166,15 +168,18 @@ int tcp_socket_incoming(const char *address, uint16_t port)
+ memcpy(&in, ent->h_addr, sizeof(in));
+ }
+
+- addr.sin_family = AF_INET;
+- addr.sin_port = htons(port);
+- memcpy(&addr.sin_addr.s_addr, &in, sizeof(in));
++ addr.sin6_family = AF_INET6;
++ addr.sin6_port = htons(port);
++ memcpy(&addr.sin6_addr.s6_addr, &in, sizeof(in));
+
+ opt = 1;
+ if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
+ (const void *) &opt, sizeof(opt)) == -1) {
+ goto error;
+ }
++ /* listen on both ipv4 and ipv6 */
++ setsockopt(s,IPPROTO_IPV6,IPV6_V6ONLY,(void*)&off,
++ sizeof(off));
+
+ if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
+ goto error;
+diff --git a/qemu-nbd.c b/qemu-nbd.c
+index 99f1d22..2538479 100644
+--- a/qemu-nbd.c
++++ b/qemu-nbd.c
+@@ -189,7 +189,7 @@ int main(int argc, char **argv)
+ bool disconnect = false;
+ const char *bindto = "0.0.0.0";
+ int port = NBD_DEFAULT_PORT;
+- struct sockaddr_in addr;
++ struct sockaddr_in6 addr;
+ socklen_t addr_len = sizeof(addr);
+ off_t fd_size;
+ char *device = NULL;
More information about the Erp5-report
mailing list