The bitfield functions and macros where removed from libubox. Add the
bitfield_set function which is used by uci, and prefix it with uci_.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
mark:
ret = true;
if (diff)
- bitfield_set(diff, i);
+ uci_bitfield_set(diff, i);
else
return ret;
}
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