From: Jim Meyering <[email protected]>
* services/confdb.c: Include gnulib's "verify.h".
(m2h): Use it.
* services/Makefile.am (INCLUDES): Add -I$(top_srcdir)/gnulib/lib
---
services/Makefile.am | 8 +++++---
services/confdb.c | 5 ++---
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/services/Makefile.am b/services/Makefile.am
index 7361e41..03aa79f 100644
--- a/services/Makefile.am
+++ b/services/Makefile.am
@@ -33,9 +33,11 @@ MAINTAINERCLEANFILES = Makefile.in
AM_CFLAGS = -fPIC
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
- -I$(top_builddir)/include/corosync \
- -I$(top_srcdir)/include/corosync
+INCLUDES = -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/include/corosync \
+ -I$(top_srcdir)/include/corosync \
+ -I$(top_srcdir)/gnulib/lib
SERVICE_LCRSO = evs cfg cpg confdb pload
diff --git a/services/confdb.c b/services/confdb.c
index c2274e6..7fd718e 100644
--- a/services/confdb.c
+++ b/services/confdb.c
@@ -34,6 +34,7 @@
#include <config.h>
+#include "verify.h"
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
@@ -58,9 +59,7 @@ LOGSYS_DECLARE_SUBSYS ("CONFDB");
static hdb_handle_t *
m2h (mar_uint64_t *m)
{
- /* FIXME enable the following when/if we use gnulib:
- (it's a compile-time assertion; i.e., zero run-time cost)
- verify (sizeof (*m) == sizeof (hdb_handle_t)); */
+ verify (sizeof (*m) == sizeof (hdb_handle_t));
return (void *) m;
}
--
1.6.3.1.135.g540c.dirty
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais