[Libguestfs] [PATCH nbdkit filters-v3 4/7] include: Prevent direct inclusion of <nbdkit-common.h>.

Richard W.M. Jones rjones at redhat.com
Fri Jan 19 22:36:25 UTC 2018


Thanks: Eric Blake.
---
 include/nbdkit-common.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/nbdkit-common.h b/include/nbdkit-common.h
index f8517d5..3177878 100644
--- a/include/nbdkit-common.h
+++ b/include/nbdkit-common.h
@@ -34,6 +34,10 @@
 #ifndef NBDKIT_COMMON_H
 #define NBDKIT_COMMON_H
 
+#if !defined (NBDKIT_PLUGIN_H) && !defined (NBDKIT_FILTER_H)
+#error this header file should not be directly included
+#endif
+
 #include <stdarg.h>
 #include <stdint.h>
 
-- 
2.15.1




More information about the Libguestfs mailing list