summaryrefslogtreecommitdiffstats
path: root/src/test/test_c_headers.c
blob: fc83a82a2bcf91e2823e50f6fe73c897c3d77e75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// -*- mode:C++; tab-width:2; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=2 sw=2 smarttab

#include <stdlib.h>
#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;

	/* librados.h */
	rados_t cluster;
	ret = rados_create(&cluster, NULL);
	if (ret < 0) {
		return EXIT_FAILURE;
	}
	/* libcephfs.h */
	struct ceph_mount_info *cmount;
	ret = ceph_create(&cmount, NULL);
	if (ret < 0) {
		return EXIT_FAILURE;
	}

	return 0;
}