From 7c89e6b7d54cd56c32a0bc3dde7380b3ed7db66e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 22 Dec 2008 11:25:28 -0800 Subject: [PATCH 1/3] Fix prototype --- cmd/zdb/zdb_il.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/cmd/zdb/zdb_il.c b/cmd/zdb/zdb_il.c index 9341e81c3d..77f7b65eb4 100644 --- a/cmd/zdb/zdb_il.c +++ b/cmd/zdb/zdb_il.c @@ -225,7 +225,7 @@ zil_prt_rec_acl(zilog_t *zilog, int txtype, lr_acl_t *lr) (u_longlong_t)lr->lr_foid, (u_longlong_t)lr->lr_aclcnt); } -typedef void (*zil_prt_rec_func_t)(zilog_t *, int, lr_t *); +typedef void (*zil_prt_rec_func_t)(zilog_t *, int, void *); typedef struct zil_rec_info { zil_prt_rec_func_t zri_print; char *zri_name; @@ -233,26 +233,26 @@ typedef struct zil_rec_info { } zil_rec_info_t; static zil_rec_info_t zil_rec_info[TX_MAX_TYPE] = { - { NULL, "Total " }, - { zil_prt_rec_create, "TX_CREATE " }, - { zil_prt_rec_create, "TX_MKDIR " }, - { zil_prt_rec_create, "TX_MKXATTR " }, - { zil_prt_rec_create, "TX_SYMLINK " }, - { zil_prt_rec_remove, "TX_REMOVE " }, - { zil_prt_rec_remove, "TX_RMDIR " }, - { zil_prt_rec_link, "TX_LINK " }, - { zil_prt_rec_rename, "TX_RENAME " }, - { zil_prt_rec_write, "TX_WRITE " }, - { zil_prt_rec_truncate, "TX_TRUNCATE " }, - { zil_prt_rec_setattr, "TX_SETATTR " }, - { zil_prt_rec_acl, "TX_ACL_V0 " }, - { zil_prt_rec_acl, "TX_ACL_ACL " }, - { zil_prt_rec_create, "TX_CREATE_ACL " }, - { zil_prt_rec_create, "TX_CREATE_ATTR " }, - { zil_prt_rec_create, "TX_CREATE_ACL_ATTR " }, - { zil_prt_rec_create, "TX_MKDIR_ACL " }, - { zil_prt_rec_create, "TX_MKDIR_ATTR " }, - { zil_prt_rec_create, "TX_MKDIR_ACL_ATTR " }, + { NULL, "Total " }, + { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_CREATE " }, + { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKDIR " }, + { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKXATTR " }, + { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_SYMLINK " }, + { (zil_prt_rec_func_t)zil_prt_rec_remove, "TX_REMOVE " }, + { (zil_prt_rec_func_t)zil_prt_rec_remove, "TX_RMDIR " }, + { (zil_prt_rec_func_t)zil_prt_rec_link, "TX_LINK " }, + { (zil_prt_rec_func_t)zil_prt_rec_rename, "TX_RENAME " }, + { (zil_prt_rec_func_t)zil_prt_rec_write, "TX_WRITE " }, + { (zil_prt_rec_func_t)zil_prt_rec_truncate, "TX_TRUNCATE " }, + { (zil_prt_rec_func_t)zil_prt_rec_setattr, "TX_SETATTR " }, + { (zil_prt_rec_func_t)zil_prt_rec_acl, "TX_ACL_V0 " }, + { (zil_prt_rec_func_t)zil_prt_rec_acl, "TX_ACL_ACL " }, + { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_CREATE_ACL " }, + { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_CREATE_ATTR " }, + { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_CREATE_ACL_ATTR " }, + { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKDIR_ACL " }, + { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKDIR_ATTR " }, + { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKDIR_ACL_ATTR " }, }; /* ARGSUSED */ From 356e66672992938fad693aeb6ad73333c1c158e4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 22 Dec 2008 11:26:16 -0800 Subject: [PATCH 2/3] Add linker flags --- cmd/zdb/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/zdb/Makefile.am b/cmd/zdb/Makefile.am index 5a88fcc151..31cf855ef2 100644 --- a/cmd/zdb/Makefile.am +++ b/cmd/zdb/Makefile.am @@ -24,4 +24,4 @@ zdb_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -zdb_LDFLAGS = +zdb_LDFLAGS = -pthread -lm -lz -lrt From 6b1fc7b8ee80ea4f01579f9ce113c0a82948a6e4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 22 Dec 2008 11:27:30 -0800 Subject: [PATCH 3/3] Add linker flags --- cmd/zinject/Makefile.am | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/cmd/zinject/Makefile.am b/cmd/zinject/Makefile.am index 18ce4d72eb..dd8417b435 100644 --- a/cmd/zinject/Makefile.am +++ b/cmd/zinject/Makefile.am @@ -1,7 +1,13 @@ include $(top_srcdir)/config/Rules.am DEFAULT_INCLUDES += \ - -I${top_srcdir}/lib/libspl/include + -I${top_srcdir}/lib/libspl/include \ + -I${top_srcdir}/lib/libuutil/include \ + -I${top_srcdir}/lib/libzfs/include \ + -I${top_srcdir}/lib/libnvpair/include \ + -I${top_srcdir}/module/zcommon/include \ + -I${top_srcdir}/module/nvpair/include \ + -I${top_srcdir}/module/avl/include sbin_PROGRAMS = zinject @@ -11,4 +17,11 @@ zinject_SOURCES = \ ${top_srcdir}/cmd/zinject/zinject.h zinject_LDADD = \ - $(top_builddir)/lib/libspl/libspl.la + $(top_builddir)/lib/libspl/libspl.la \ + $(top_builddir)/lib/libavl/libavl.la \ + $(top_builddir)/lib/libnvpair/libnvpair.la \ + $(top_builddir)/lib/libuutil/libuutil.la \ + $(top_builddir)/lib/libzpool/libzpool.la \ + $(top_builddir)/lib/libzfs/libzfs.la + +zinject_LDFLAGS = -pthread -lm -lz -lrt