summaryrefslogtreecommitdiff
path: root/zfsutils/debian/patches/libzfs-avoid-libadm.patch
blob: 7883bb8e822f241e857e00dcc90c913e085e9e62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Index: zfsutils/usr/src/lib/libzfs/Makefile.com
===================================================================
--- zfsutils.orig/usr/src/lib/libzfs/Makefile.com	2012-11-11 19:14:48.484144483 +0000
+++ zfsutils/usr/src/lib/libzfs/Makefile.com	2012-11-11 19:21:22.767996007 +0000
@@ -51,6 +51,7 @@
 	libzfs_util.o
 
 OBJECTS= $(OBJS_COMMON) $(OBJS_SHARED)
+OBJECTS += rdwr_vtoc.o
 
 include ../../Makefile.lib
 
@@ -69,7 +70,7 @@
 C99MODE=	-xc99=%all
 C99LMODE=	-Xc99=%all
 LDLIBS +=	-lc -lm -ldevid -lgen -lnvpair -luutil -lavl -lefi \
-	-ladm -lidmap -ltsol -lmd -lumem -lzfs_core
+	-lidmap -ltsol -lmd -lumem -lzfs_core
 CPPFLAGS +=	$(INCS) -D_LARGEFILE64_SOURCE=1 -D_REENTRANT
 
 CERRWARN +=	-_gcc=-Wno-switch
@@ -91,4 +92,8 @@
 	$(COMPILE.c) -o $@ $<
 	$(POST_PROCESS_O)
 
+pics/%.o: ../../../lib/libadm/common/rdwr_vtoc.c
+	$(COMPILE.c) -o $@ $<
+	$(POST_PROCESS_O)
+
 include ../../Makefile.targ
Index: zfsutils/usr/src/lib/libzfs/common/libzfs_import.c
===================================================================
--- zfsutils.orig/usr/src/lib/libzfs/common/libzfs_import.c	2012-11-11 19:14:48.483759867 +0000
+++ zfsutils/usr/src/lib/libzfs/common/libzfs_import.c	2012-11-11 19:26:24.491372941 +0000
@@ -61,6 +61,11 @@
 #include "libzfs.h"
 #include "libzfs_impl.h"
 
+extern	int	read_vtoc(int, struct vtoc *);
+extern	int	write_vtoc(int, struct vtoc *);
+extern	int	read_extvtoc(int, struct extvtoc *);
+extern	int	write_extvtoc(int, struct extvtoc *);
+
 /*
  * Intermediate structures used to gather configuration information.
  */