On Tue, Nov 19, 2013 at 1:35 PM, Doug Goldstein <cardoe@cardoe.com> wrote:
From: "Daniel P. Berrange" <berrange@redhat.com>
Import the libvirt memory allocation functions, stripping the OOM testing and error reporting pieces.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- libvirt-lxc-override.c | 1 + libvirt-override.c | 106 +++++++++++++++++++++---------------------- libvirt-qemu-override.c | 1 + libvirt-utils.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++++ libvirt-utils.h | 77 +++++++++++++++++++++++++++++++ typewrappers.c | 1 + 6 files changed, 250 insertions(+), 53 deletions(-) create mode 100644 libvirt-utils.c
+++ b/libvirt-utils.c @@ -0,0 +1,117 @@ +/* + * libvirt-utils.c: misc helper APIs for python binding + * + * Copyright (C) 2013 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + * + */
Rather than repost the whole series since we're still in a work in progress. I needed to add the following: #include <errno.h> #include <stddef.h> #include <stdlib.h>
+ +#include "libvirt-utils.h" +
-- Doug Goldstein