Re: libceph API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 27, 2011 at 11:49:11AM -0700, Brian Chrisman wrote:
> ceph_mount_t is forward declared as a struct in libceph.h.
> When referencing that within libceph.h, gcc barfs:
> client/libceph.h:32: error: expected â)â before â*â token
> 
> Is libceph.h intended to be used in C-programs, and if so, am I using
> it incorrectly?
> ceph_mount_t is defined as a class in libceph.cc, and I'm unclear on
> how that would be translated into a struct for C-programs linking to
> libceph.

We talked about this on IRC, replying here for others & historical
records.

The problem is this:

struct ceph_mount_t;

int ceph_create(ceph_mount_t **cmount, const char * const id);

There is no ceph_mount_t. Changing the prototype to

int ceph_create(struct ceph_mount_t **cmount, const char * const id);

should get things going nicely (as long as you fix up the
implementation also).



(And in case someone is thinking about suggesting a typedef, I'm with
the other Finn on this one:
http://lkml.indiana.edu/hypermail/linux/kernel/0206.1/0402.html
)

-- 
:(){ :|:&};:
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux