mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 08:44:27 +08:00
C++ compatibility for some kernel headers
This commit is contained in:
@@ -612,7 +612,7 @@ drbr_enqueue(struct ifnet *ifp, struct buf_ring *br, struct mbuf *m)
|
||||
}
|
||||
|
||||
static __inline void
|
||||
drbr_putback(struct ifnet *ifp, struct buf_ring *br, struct mbuf *new)
|
||||
drbr_putback(struct ifnet *ifp, struct buf_ring *br, struct mbuf *new_mbuf)
|
||||
{
|
||||
/*
|
||||
* The top of the list needs to be swapped
|
||||
@@ -624,11 +624,11 @@ drbr_putback(struct ifnet *ifp, struct buf_ring *br, struct mbuf *new)
|
||||
* Peek in altq case dequeued it
|
||||
* so put it back.
|
||||
*/
|
||||
IFQ_DRV_PREPEND(&ifp->if_snd, new);
|
||||
IFQ_DRV_PREPEND(&ifp->if_snd, new_mbuf);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
buf_ring_putback_sc(br, new);
|
||||
buf_ring_putback_sc(br, new_mbuf);
|
||||
}
|
||||
|
||||
static __inline struct mbuf *
|
||||
@@ -647,7 +647,7 @@ drbr_peek(struct ifnet *ifp, struct buf_ring *br)
|
||||
return (m);
|
||||
}
|
||||
#endif
|
||||
return(buf_ring_peek(br));
|
||||
return ((struct mbuf *)buf_ring_peek(br));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
@@ -659,7 +659,7 @@ drbr_flush(struct ifnet *ifp, struct buf_ring *br)
|
||||
if (ifp != NULL && ALTQ_IS_ENABLED(&ifp->if_snd))
|
||||
IFQ_PURGE(&ifp->if_snd);
|
||||
#endif
|
||||
while ((m = buf_ring_dequeue_sc(br)) != NULL)
|
||||
while ((m = (struct mbuf *)buf_ring_dequeue_sc(br)) != NULL)
|
||||
m_freem(m);
|
||||
}
|
||||
|
||||
@@ -682,7 +682,7 @@ drbr_dequeue(struct ifnet *ifp, struct buf_ring *br)
|
||||
return (m);
|
||||
}
|
||||
#endif
|
||||
return (buf_ring_dequeue_sc(br));
|
||||
return ((struct mbuf *)buf_ring_dequeue_sc(br));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
@@ -715,11 +715,11 @@ drbr_dequeue_cond(struct ifnet *ifp, struct buf_ring *br,
|
||||
return (m);
|
||||
}
|
||||
#endif
|
||||
m = buf_ring_peek(br);
|
||||
m = (struct mbuf *)buf_ring_peek(br);
|
||||
if (m == NULL || func(m, arg) == 0)
|
||||
return (NULL);
|
||||
|
||||
return (buf_ring_dequeue_sc(br));
|
||||
return ((struct mbuf *)buf_ring_dequeue_sc(br));
|
||||
}
|
||||
|
||||
static __inline int
|
||||
|
Reference in New Issue
Block a user