This fixes compilation issues when btrfs.h isn't available (because we just need the relevant structs, which for userspace programs are supposed to come from btrfs-progs instead of the kernel headers).
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
| ... | ... |
@@ -32,6 +32,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq \ |
| 32 | 32 |
apt-utils \ |
| 33 | 33 |
aufs-tools \ |
| 34 | 34 |
automake \ |
| 35 |
+ btrfs-tools \ |
|
| 35 | 36 |
build-essential \ |
| 36 | 37 |
curl \ |
| 37 | 38 |
dpkg-sig \ |
| ... | ... |
@@ -40,7 +41,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq \ |
| 40 | 40 |
libapparmor-dev \ |
| 41 | 41 |
libcap-dev \ |
| 42 | 42 |
libsqlite3-dev \ |
| 43 |
- linux-libc-dev \ |
|
| 44 | 43 |
mercurial \ |
| 45 | 44 |
reprepro \ |
| 46 | 45 |
ruby1.9.1 \ |
| ... | ... |
@@ -4,15 +4,11 @@ package btrfs |
| 4 | 4 |
|
| 5 | 5 |
/* |
| 6 | 6 |
#include <stdlib.h> |
| 7 |
-#include <sys/ioctl.h> |
|
| 8 |
-#include <linux/fs.h> |
|
| 9 |
-#include <errno.h> |
|
| 10 |
-#include <sys/types.h> |
|
| 11 | 7 |
#include <dirent.h> |
| 12 |
-#include <linux/btrfs.h> |
|
| 13 |
- |
|
| 8 |
+#include <btrfs/ioctl.h> |
|
| 14 | 9 |
*/ |
| 15 | 10 |
import "C" |
| 11 |
+ |
|
| 16 | 12 |
import ( |
| 17 | 13 |
"fmt" |
| 18 | 14 |
"github.com/dotcloud/docker/graphdriver" |
| ... | ... |
@@ -39,6 +39,7 @@ To build docker, you will need the following system dependencies |
| 39 | 39 |
* Go version 1.2 or later |
| 40 | 40 |
* SQLite version 3.7.9 or later |
| 41 | 41 |
* libdevmapper version 1.02.68-cvs (2012-01-26) or later from lvm2 version 2.02.89 or later |
| 42 |
+* btrfs-progs version 3.8 or later (including commit e5cb128 from 2013-01-07) for the necessary btrfs headers |
|
| 42 | 43 |
* A clean checkout of the source must be added to a valid Go [workspace](http://golang.org/doc/code.html#Workspaces) |
| 43 | 44 |
under the path *src/github.com/dotcloud/docker*. |
| 44 | 45 |
|