All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "David S . Miller" <davem@davemloft.net>,
	Deepa Dinamani <deepa.kernel@gmail.com>,
	Willem de Bruijn <willemb@google.com>,
	linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org,
	sparclinux@vger.kernel.org, Laura Abbott <labbott@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-api@vger.kernel.org
Subject: Re: [PATCH] y2038: fix socket.h header inclusion
Date: Thu, 14 Mar 2019 19:37:15 +0100	[thread overview]
Message-ID: <87k1h1fgkk.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <20190311153857.563743-1-arnd@arndb.de> (Arnd Bergmann's message of "Mon, 11 Mar 2019 16:38:17 +0100")

* Arnd Bergmann:

> diff --git a/arch/alpha/include/uapi/asm/socket.h b/arch/alpha/include/uapi/asm/socket.h
> index 0d0fddb7e738..976e89b116e5 100644
> --- a/arch/alpha/include/uapi/asm/socket.h
> +++ b/arch/alpha/include/uapi/asm/socket.h
> @@ -2,8 +2,8 @@
>  #ifndef _UAPI_ASM_SOCKET_H
>  #define _UAPI_ASM_SOCKET_H
>  
> +#include <linux/posix_types.h>
>  #include <asm/sockios.h>
> -#include <asm/bitsperlong.h>

This breaks POSIX conformance in glibc because the
<linux/posix_types.h> header is not namespace clean.  It contains the
identifiers fds_bits and val:

	unsigned long fds_bits[__FD_SETSIZE / (8 * sizeof(long))];

        int     val[2];

We could duplicate some of the SO_* constants for POSIX mode in glibc,
but it would be nice to avoid that.

Is there a different way of fixing this on the kernel side that avoids
including <linux/posix_types.h>?

WARNING: multiple messages have this Message-ID (diff)
From: Florian Weimer <fw@deneb.enyo.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "David S . Miller" <davem@davemloft.net>,
	Deepa Dinamani <deepa.kernel@gmail.com>,
	Willem de Bruijn <willemb@google.com>,
	linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org,
	sparclinux@vger.kernel.org, Laura Abbott <labbott@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-api@vger.kernel.org
Subject: Re: [PATCH] y2038: fix socket.h header inclusion
Date: Thu, 14 Mar 2019 18:37:15 +0000	[thread overview]
Message-ID: <87k1h1fgkk.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <20190311153857.563743-1-arnd@arndb.de> (Arnd Bergmann's message of "Mon, 11 Mar 2019 16:38:17 +0100")

* Arnd Bergmann:

> diff --git a/arch/alpha/include/uapi/asm/socket.h b/arch/alpha/include/uapi/asm/socket.h
> index 0d0fddb7e738..976e89b116e5 100644
> --- a/arch/alpha/include/uapi/asm/socket.h
> +++ b/arch/alpha/include/uapi/asm/socket.h
> @@ -2,8 +2,8 @@
>  #ifndef _UAPI_ASM_SOCKET_H
>  #define _UAPI_ASM_SOCKET_H
>  
> +#include <linux/posix_types.h>
>  #include <asm/sockios.h>
> -#include <asm/bitsperlong.h>

This breaks POSIX conformance in glibc because the
<linux/posix_types.h> header is not namespace clean.  It contains the
identifiers fds_bits and val:

	unsigned long fds_bits[__FD_SETSIZE / (8 * sizeof(long))];

        int     val[2];

We could duplicate some of the SO_* constants for POSIX mode in glibc,
but it would be nice to avoid that.

Is there a different way of fixing this on the kernel side that avoids
including <linux/posix_types.h>?

  parent reply	other threads:[~2019-03-14 18:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 15:38 [PATCH] y2038: fix socket.h header inclusion Arnd Bergmann
2019-03-11 15:38 ` Arnd Bergmann
2019-03-11 18:23 ` David Miller
2019-03-11 18:23   ` David Miller
2019-03-14 18:37 ` Florian Weimer [this message]
2019-03-14 18:37   ` Florian Weimer
2019-03-15 20:30   ` Arnd Bergmann
2019-03-15 20:30     ` Arnd Bergmann
2019-03-15 21:20     ` Florian Weimer
2019-03-15 21:20       ` Florian Weimer
2019-03-17 18:20       ` Deepa Dinamani
2019-03-17 18:20         ` Deepa Dinamani
2019-03-18  8:27         ` Arnd Bergmann
2019-03-18  8:27           ` Arnd Bergmann
2019-03-18  9:21           ` Florian Weimer
2019-03-18  9:21             ` Florian Weimer
2019-03-18 12:56             ` Arnd Bergmann
2019-03-18 12:56               ` Arnd Bergmann
2019-03-18 13:12               ` Florian Weimer
2019-03-18 13:12                 ` Florian Weimer
2019-03-18 13:12                 ` Florian Weimer
2019-03-18 14:34                 ` Arnd Bergmann
2019-03-18 14:34                   ` Arnd Bergmann
2019-03-18 14:34                   ` Arnd Bergmann
2019-03-18 14:37                   ` Florian Weimer
2019-03-18 14:37                     ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k1h1fgkk.fsf@mid.deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=deepa.kernel@gmail.com \
    --cc=labbott@redhat.com \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.