I have a C struct defined as:
struct my_c_s {
u_char *ptr;
unsigned flag_a:1;
unsigned
No, you can't.
There is an open issue about supporting bitfields, which doesn't seem to be active. In the issue, @retep998 explains how bitfields are handled in winapi. That might be helpful if you need to handle bitfields in C interface.
OP seems to aim at C interoperation, but if you just need bitfields functionality, there are several solutions.
enum
in C.#[repr(packed)]
if you just want to pack fields to some degree, ignoring alignment. The fields will still be aligned to byte boundary.