#include #ifdef NOP #define jint32_t uint32_t #define jint16_t uint16_t #define je16_to_cpu(x) ((x)) #define je32_to_cpu(x) ((x)) #else typedef struct { uint32_t v32; } __attribute__((packed)) jint32_t; typedef struct { uint16_t v16; } __attribute__((packed)) jint16_t; #define je16_to_cpu(x) ((x).v16) #define je32_to_cpu(x) ((x).v32) #endif struct jffs2_sum_unknown_flash { jint16_t nodetype; /* node type */ }; struct jffs2_unknown_node { /* All start like this */ jint16_t magic; jint16_t nodetype; jint32_t totlen; /* So we can skip over nodes we don't grok */ jint32_t hdr_crc; }; int boo(struct jffs2_unknown_node *node, void *sp) { foo(je32_to_cpu(node->totlen), je16_to_cpu(node->nodetype), je16_to_cpu(((struct jffs2_sum_unknown_flash *)sp)->nodetype)); }