X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=uci.h;h=43f2052a00e6901e67cd6d1956fdb36375b41358;hp=6a72b6a0f9eadc0b2061589041fec502ea9f364e;hb=3b3d63e234978e76a901b7968955a3f2e7e855d4;hpb=df72af474075159ab79ed190d2109eb2d86709bf diff --git a/uci.h b/uci.h index 6a72b6a..43f2052 100644 --- a/uci.h +++ b/uci.h @@ -435,7 +435,6 @@ struct uci_package struct uci_backend *backend; void *priv; int n_section; - int name_index; struct uci_list delta; struct uci_list saved_delta; }; @@ -690,6 +689,15 @@ uci_lookup_option_string(struct uci_context *ctx, struct uci_section *s, const c return o->v.string; } +#ifndef BITS_PER_LONG +#define BITS_PER_LONG (8 * sizeof(unsigned long)) +#endif + +static inline void uci_bitfield_set(unsigned long *bits, int bit) +{ + bits[bit / BITS_PER_LONG] |= (1UL << (bit % BITS_PER_LONG)); +} + #ifdef __cplusplus } #endif