All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Tadeusz Struk <tadeusz.struk@linaro.org>
Cc: Dan Williams <dan.j.williams@intel.com>,
	Gustavo Silva <gustavoars@kernel.org>,
	Keith Packard <keithp@keithp.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] uapi/linux/stddef.h: add include guards
Date: Wed, 30 Mar 2022 14:49:46 -0700	[thread overview]
Message-ID: <202203301448.31FEB0D2B@keescook> (raw)
In-Reply-To: <20220329171252.57279-1-tadeusz.struk@linaro.org>

On Tue, Mar 29, 2022 at 10:12:52AM -0700, Tadeusz Struk wrote:
> Add iclude guarde to uapi/linux/stddef.h to prevent
> redefining macros.
> 
> Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>

Hi!

What was tripping over this? This isn't a new file, so has something
changed with how it has been included?

-Kees

> ---
>  include/uapi/linux/stddef.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/uapi/linux/stddef.h b/include/uapi/linux/stddef.h
> index 3021ea25a284..7837ba4fe728 100644
> --- a/include/uapi/linux/stddef.h
> +++ b/include/uapi/linux/stddef.h
> @@ -1,4 +1,7 @@
>  /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> +#ifndef _UAPI_LINUX_STDDEF_H
> +#define _UAPI_LINUX_STDDEF_H
> +
>  #include <linux/compiler_types.h>
>  
>  #ifndef __always_inline
> @@ -41,3 +44,4 @@
>  		struct { } __empty_ ## NAME; \
>  		TYPE NAME[]; \
>  	}
> +#endif
> -- 
> 2.35.1
> 

-- 
Kees Cook

  reply	other threads:[~2022-03-30 21:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-29 17:12 [PATCH] uapi/linux/stddef.h: add include guards Tadeusz Struk
2022-03-30 21:49 ` Kees Cook [this message]
2022-03-30 22:48   ` Tadeusz Struk
2022-03-31 20:07 ` Kees Cook
2022-03-31 20:25 ` Kees Cook

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=202203301448.31FEB0D2B@keescook \
    --to=keescook@chromium.org \
    --cc=dan.j.williams@intel.com \
    --cc=gustavoars@kernel.org \
    --cc=keithp@keithp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tadeusz.struk@linaro.org \
    /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.