[RFC 01/47] eal: add BSD version of queue.h

Thomas Monjalon thomas at monjalon.net
Tue Aug 19 17:29:28 CEST 2025


19/08/2025 17:24, Stephen Hemminger:
> On Tue, 19 Aug 2025 10:37:27 +0200
> Thomas Monjalon <thomas at monjalon.net> wrote:
> 
> > 19/08/2025 01:27, Stephen Hemminger:
> > > +++ b/lib/eal/include/bsd_queue.h
> > > @@ -0,0 +1,1075 @@
> > > +/*-
> > > + * SPDX-License-Identifier: BSD-3-Clause
> > > + *
> > > + * Copyright (c) 1991, 1993
> > > + *     The Regents of the University of California.  All rights reserved.
> > > + *
> > > + * This is a copy of sys/queue.h which is used to overcome
> > > + * missing parts in the glibc version (and Windows).
> > > + */
> > > +
> > > +#ifndef _SYS_QUEUE_H_
> > > +#define _SYS_QUEUE_H_  
> > 
> > Shouldn't we rename this include flag? with RTE_ prefix?
> 
> 
> No, by keeping the same prefix if the user includes both sys/queue.h and bsd_queue.h
> there will be no confilcts.

You mean by checking _SYS_QUEUE_H_ which is the same as sys/queue.h?
So if I include sys/queue.h first, I will have a limited version.
It means we should not include it before any DPDK include.
It looks like a limitation for DPDK users.





More information about the dev mailing list