Messages in this thread | | | From | Arnd Bergmann <> | Date | Wed, 30 Mar 2022 08:08:25 +0200 | Subject | Re: [PATCH] net, uapi: remove inclusion of arpa/inet.h |
| |
On Wed, Mar 30, 2022 at 12:26 AM Nick Desaulniers <ndesaulniers@google.com> wrote: > On Tue, Mar 29, 2022 at 3:09 PM Nick Desaulniers <ndesaulniers@google.com> wrote: > ``` > diff --git a/include/uapi/linux/byteorder/little_endian.h > b/include/uapi/linux/byteorder/little_endian.h > index cd98982e7523..c14f2c3728e2 100644 > --- a/include/uapi/linux/byteorder/little_endian.h > +++ b/include/uapi/linux/byteorder/little_endian.h > @@ -103,5 +103,8 @@ static __always_inline __u16 __be16_to_cpup(const __be16 *p) > #define __cpu_to_be16s(x) __swab16s((x)) > #define __be16_to_cpus(x) __swab16s((x)) > > +#define htonl(x) __cpu_to_be32(x) > +#define htons(x) __cpu_to_be16(x) > +#define ntohs(x) __be16_to_cpu(x) >
This is unfortunately a namespace violation, you can't define things in uapi headers that conflict with standard library interfaces.
Arnd
| |