libcephfs/librados headers should work with gcc.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
ceph_test_cfuse_cache_invalidate_SOURCES = test/test_cfuse_cache_invalidate.cc
bin_DEBUGPROGRAMS += ceph_test_cfuse_cache_invalidate
+ceph_test_c_headers_SOURCES = test/test_c_headers.c
+ceph_test_c_headers_LDADD = $(LIBRADOS) $(LIBCEPHFS)
+bin_DEBUGPROGRAMS += ceph_test_c_headers
noinst_HEADERS += \
test/osd/RadosModel.h \
--- /dev/null
+#include "include/cephfs/libcephfs.h"
+#include "include/rados/librados.h"
+
+#ifdef __cplusplus
+#error "test invalid: only use C mode"
+#endif
+
+int main(int argc, char **argv)
+{
+ int ret;
+ (void)ret; // squash unused warning
+
+ /* librados.h */
+ rados_t cluster;
+ ret = rados_create(&cluster, NULL);
+
+ /* libcephfs.h */
+ struct ceph_mount_info *cmount;
+ ret = ceph_create(&cmount, NULL);
+
+ return 0;
+}