#20930: Linux compilation failure
-------------------------+------------------------
Reporter: spk.punith | Owner: developers
Type: defect | Status: new
Priority: high | Milestone:
Component: kernel | Version: Trunk
Resolution: | Keywords:
-------------------------+------------------------
Comment (by spk.punith):
Replying to [comment:5 anonymous]:
I have corrected the patch(911-kobject_add_broadcast_uevent.patch) causing
this error.
Replace the patch with following code. And it worked for me with or
without CONFIG_NET
{{{
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -221,4 +221,10 @@ int add_uevent_var(struct kobj_uevent_en
int kobject_action_type(const char *buf, size_t count,
enum kobject_action *type);
+#ifdef CONFIG_NET
+
+int broadcast_uevent(struct sk_buff *skb, __u32 pid, __u32 group,
+ gfp_t allocation);
+#endif
+
#endif /* _KOBJECT_H_ */
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -424,6 +424,34 @@ int add_uevent_var(struct kobj_uevent_en
EXPORT_SYMBOL_GPL(add_uevent_var);
#if defined(CONFIG_NET)
+int broadcast_uevent(struct sk_buff *skb, __u32 pid, __u32 group,
+ gfp_t allocation)
+{
+ struct uevent_sock *ue_sk;
+ int err = 0;
+
+ /* send netlink message */
+ mutex_lock(&uevent_sock_mutex);
+ list_for_each_entry(ue_sk, &uevent_sock_list, list) {
+ struct sock *uevent_sock = ue_sk->sk;
+ struct sk_buff *skb2;
+
+ skb2 = skb_clone(skb, allocation);
+ if (!skb2)
+ break;
+
+ err = netlink_broadcast(uevent_sock, skb2, pid, group,
+ allocation);
+ if (err)
+ break;
+ }
+ mutex_unlock(&uevent_sock_mutex);
+
+ kfree_skb(skb);
+ return err;
+}
+EXPORT_SYMBOL_GPL(broadcast_uevent);
+
static int uevent_net_init(struct net *net)
{
struct uevent_sock *ue_sk;
}}}
--
Ticket URL: <https://dev.openwrt.org/ticket/20930#comment:6>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets