debuggers.hg

changeset 21082:c1f272c3a441

blktap/fs-back: Build fixes for Fedora 13

1. Some files use stat, mkfifo, mkdir etc. without including
sys/stat.h

2. Some programs link against libpthread without a -lpthread compile
option. The compile used to work if this library happened to be used
by one of the other libraries that was being linked against, but
Fedora 13 has stopped allowing this.

From: M A Young <m.a.young@durham.ac.uk>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Mar 15 17:08:29 2010 +0000 (2010-03-15)
parents 257589edefb3
children 499a11c1c25e
files tools/blktap/drivers/Makefile tools/blktap/drivers/blktapctrl.c tools/blktap/drivers/block-qcow2.c tools/blktap2/drivers/block-remus.c tools/blktap2/vhd/lib/libvhd.c tools/blktap2/vhd/lib/vhd-util-scan.c tools/fs-back/Makefile
line diff
     1.1 --- a/tools/blktap/drivers/Makefile	Mon Mar 15 13:25:30 2010 +0000
     1.2 +++ b/tools/blktap/drivers/Makefile	Mon Mar 15 17:08:29 2010 +0000
     1.3 @@ -29,7 +29,7 @@ CFLAGS += -DMEMSHR
     1.4  MEMSHRLIBS += $(MEMSHR_DIR)/libmemshr.a
     1.5  endif
     1.6  
     1.7 -LDFLAGS_blktapctrl := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm
     1.8 +LDFLAGS_blktapctrl := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm -lpthread
     1.9  LDFLAGS_img := $(LIBAIO_DIR)/libaio.a $(CRYPT_LIB) -lpthread -lz
    1.10  
    1.11  BLK-OBJS-y  := block-aio.o
     2.1 --- a/tools/blktap/drivers/blktapctrl.c	Mon Mar 15 13:25:30 2010 +0000
     2.2 +++ b/tools/blktap/drivers/blktapctrl.c	Mon Mar 15 17:08:29 2010 +0000
     2.3 @@ -51,6 +51,7 @@
     2.4  #include <sys/time.h>
     2.5  #include <syslog.h>
     2.6  #include <memshr.h>
     2.7 +#include <sys/stat.h>
     2.8                                                                       
     2.9  #include "blktaplib.h"
    2.10  #include "blktapctrl.h"
     3.1 --- a/tools/blktap/drivers/block-qcow2.c	Mon Mar 15 13:25:30 2010 +0000
     3.2 +++ b/tools/blktap/drivers/block-qcow2.c	Mon Mar 15 17:08:29 2010 +0000
     3.3 @@ -30,6 +30,7 @@
     3.4  #include <stdio.h>
     3.5  #include <stdlib.h>
     3.6  #include <string.h>
     3.7 +#include <sys/stat.h>
     3.8  
     3.9  #include "tapdisk.h"
    3.10  #include "tapaio.h"
     4.1 --- a/tools/blktap2/drivers/block-remus.c	Mon Mar 15 13:25:30 2010 +0000
     4.2 +++ b/tools/blktap2/drivers/block-remus.c	Mon Mar 15 17:08:29 2010 +0000
     4.3 @@ -57,6 +57,7 @@
     4.4  #include <sys/param.h>
     4.5  #include <sys/sysctl.h>
     4.6  #include <unistd.h>
     4.7 +#include <sys/stat.h>
     4.8  
     4.9  /* timeout for reads and writes in ms */
    4.10  #define HEARTBEAT_MS 1000
     5.1 --- a/tools/blktap2/vhd/lib/libvhd.c	Mon Mar 15 13:25:30 2010 +0000
     5.2 +++ b/tools/blktap2/vhd/lib/libvhd.c	Mon Mar 15 17:08:29 2010 +0000
     5.3 @@ -36,6 +36,7 @@
     5.4  #include <libgen.h>
     5.5  #include <iconv.h>
     5.6  #include <sys/mman.h>
     5.7 +#include <sys/stat.h>
     5.8  
     5.9  #include "libvhd.h"
    5.10  #include "relative-path.h"
     6.1 --- a/tools/blktap2/vhd/lib/vhd-util-scan.c	Mon Mar 15 13:25:30 2010 +0000
     6.2 +++ b/tools/blktap2/vhd/lib/vhd-util-scan.c	Mon Mar 15 17:08:29 2010 +0000
     6.3 @@ -34,6 +34,7 @@
     6.4  #include <unistd.h>
     6.5  #include <fnmatch.h>
     6.6  #include <libgen.h>	/* for basename() */
     6.7 +#include <sys/stat.h>
     6.8  
     6.9  #include "list.h"
    6.10  #include "libvhd.h"
     7.1 --- a/tools/fs-back/Makefile	Mon Mar 15 13:25:30 2010 +0000
     7.2 +++ b/tools/fs-back/Makefile	Mon Mar 15 17:08:29 2010 +0000
     7.3 @@ -16,7 +16,7 @@ CFLAGS   += -D_GNU_SOURCE
     7.4  LIBS      := -L. -L.. -L../lib
     7.5  LIBS      += $(LDFLAGS_libxenctrl)
     7.6  LIBS      += $(LDFLAGS_libxenstore)
     7.7 -LIBS      += -lrt 
     7.8 +LIBS      += -lrt -lpthread
     7.9  
    7.10  OBJS	  := fs-xenbus.o fs-ops.o
    7.11