path: root/daemon
diff options
authorNiels de Vos <>2017-03-13 14:01:24 +0100
committerNiels de Vos <>2017-03-17 15:11:09 +0100
commit5d3d0bc59c1115117e6e624d12227d53a474b2ec (patch)
tree85139ac97fa680ce3b52c1ff4250bb29069a12a9 /daemon
parent30e5f195a1b80ffe304b2ed70e0a2d8253d0cc42 (diff)
build: use rpcgen to generate all XDR code
Remove all generated files and have them generated when needed. This build a archive with the .o files that gets linked into the archive. 'rpcgen' generates .c code that triggers warnings for various compilers. This is not something that can easily be fixed, so add rpc-pragmas.h (like GlusterFS does) to prevent these warnings. There are some functions used by gluster-blockd.c that are not part of the header and were manually added to block.h. Because block.h get regenerated now, these functions have been added to a new file block_svc.h. Note that generated and compiled files land in $(top_builddir). This directory does not need to be the same as $(top_srcdir). Change-Id: I0e764d159d6d785699537eed4e24b16883218038 Fixes: #2 Signed-off-by: Niels de Vos <>
Diffstat (limited to 'daemon')
2 files changed, 5 insertions, 3 deletions
diff --git a/daemon/ b/daemon/
index 038fce8..faacb67 100644
--- a/daemon/
+++ b/daemon/
@@ -3,10 +3,11 @@ sbin_PROGRAMS = gluster-blockd
gluster_blockd_SOURCES = gluster-blockd.c
gluster_blockd_CFLAGS = -DDATADIR=\"$(localstatedir)\" \
- -I$(top_srcdir)/utils/ -I$(top_srcdir)/rpc
+ -I$(top_srcdir)/utils/ -I$(top_srcdir)/rpc \
+ -I$(top_builddir)/rpc/rpcl
-gluster_blockd_LDADD = $(PTHREAD) $(top_srcdir)/rpc/ \
- $(top_srcdir)/utils/
+gluster_blockd_LDADD = $(PTHREAD) $(top_builddir)/rpc/ \
+ $(top_builddir)/utils/
diff --git a/daemon/gluster-blockd.c b/daemon/gluster-blockd.c
index d4cae91..54329bc 100644
--- a/daemon/gluster-blockd.c
+++ b/daemon/gluster-blockd.c
@@ -17,6 +17,7 @@
# include "common.h"
# include "block.h"
+# include "block_svc.h"