fence-virtd: Add missing vsock makefile bits

Add missing bits to the makefiles to build the vsock listener plugin.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
This commit is contained in:
Ryan McCabe 2017-08-25 17:02:02 -04:00
parent 26ac949176
commit ada1814db3
3 changed files with 15 additions and 1 deletions

View File

@ -121,6 +121,13 @@ AC_ARG_ENABLE(serial-plugin,
[ mod_serial=$enableval ], [ mod_serial=yes ])
AC_SUBST(mod_serial)
# vsock plugin: Enabled by default
AC_ARG_ENABLE(vsock-plugin,
[AS_HELP_STRING([--disable-vsock-plugin],
[Disable TCP listener plugin])],
[ mod_vsock=$enableval ], [ mod_vsock=yes ])
AC_SUBST(mod_vsock)
#
# Compatibility symlink: disabled by default
#

View File

@ -139,6 +139,10 @@ ifneq ($(mod_tcp),no)
fence_virtd_SOURCES+=${tcp_so_SOURCES}
LIBS+=$(NSS_LIBS)
endif
ifneq ($(mod_vsock),no)
fence_virtd_SOURCES+=${vsock_so_SOURCES}
LIBS+=$(NSS_LIBS)
endif
ifneq ($(mod_null),no)
fence_virtd_SOURCES+=${null_so_SOURCES}
endif
@ -181,6 +185,9 @@ serial.so: ${serial_so_SOURCES:.c=.o}
tcp.so: ${tcp_so_SOURCES:.c=.o}
$(CC) -o $@ $^ $(LIBS) -shared $(NSS_LIBS)
vsock.so: ${vsock_so_SOURCES:.c=.o}
$(CC) -o $@ $^ $(LIBS) -shared $(NSS_LIBS)
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $^ $(INCLUDES)

View File

@ -471,7 +471,7 @@ vsock_init(listener_context_t *c, const fence_callbacks_t *cb,
else if (ret > 0)
printf("%d errors found during vsock listener configuration\n", ret);
if (ret != 0) {
if (ret != 0) {
if (info->args.key_file)
free(info->args.key_file);
free(info);