These are changes mostly required by gcc 4.5, with the exception of the change
to Config.mk, which inserts some make variables that we expect to be inserted
by the spec file. The rest of the changes are including missing headers,
initialising a variable and providing a mode when opening a file.
Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
SHELL ?= /bin/sh
DESTDIR ?= /
+SBINDIR ?= usr/sbin
+SYSCONFDIR ?= etc
include $(BLKTAP_ROOT)/config/$(BLKTAP_OS).mk
include $(BLKTAP_ROOT)/config/$(BLKTAP_TARGET_ARCH).mk
#include <limits.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
#include "blktap.h"
#include "tapdisk-vbd.h"
return;
}
- fd = open(fn, O_WRONLY | O_CREAT | O_NONBLOCK);
+ fd = open(fn, O_WRONLY | O_CREAT | O_NONBLOCK, 0666);
if (fd == -1)
EPRINTF("Failed to open file to signal ENOSPC condition\n");
else
#include <stdlib.h>
#include <string.h>
#include <libgen.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include "libvhd.h"
#include "libvhd-index.h"
#include <libgen.h>
#include <iconv.h>
#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include "libvhd.h"
#include "relative-path.h"
fd = -1;
memset(&vhd, 0, sizeof(vhd));
+ memset(&footer, 0, sizeof(footer));
err = stat(name, &stats);
if (err == -1) {
#include <unistd.h>
#include <fnmatch.h>
#include <syslog.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include "list.h"
#include "libvhd.h"