Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jan 2024 21:48:03 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Ed Maste <emaste@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org,  dev-commits-src-main@freebsd.org
Subject:   Re: git: fbd156d78fbd - main - Revert "nl_types.h: explicitly include cdefs.h"
Message-ID:  <CANCZdfp8MNbMYaP7YtyW9yVZ=hWnEn7ncvwQ9zJa1FM0sCbREw@mail.gmail.com>
In-Reply-To: <202401250351.40P3p2on023675@gitrepo.freebsd.org>
References:  <202401250351.40P3p2on023675@gitrepo.freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Thanks Ed...

I think that

diff --git a/tools/build/cross-build/include/linux/sys/types.h
b/tools/build/cross-build/include/linux/sys/types.h
index 770b3057f8a8..e72e1419bccd 100644
--- a/tools/build/cross-build/include/linux/sys/types.h
+++ b/tools/build/cross-build/include/linux/sys/types.h
@@ -35,6 +35,11 @@
  */
 #pragma once

+/*
+ * FreeBSD's types.h always includes sys/cdefs.h, but Linux headers often
don't.
+ */
+#include <sys/cdefs.h>
+
 #include_next <sys/types.h>

 #ifndef __size_t

will filx the problem, but I can't test things easily enough.

Warner

On Wed, Jan 24, 2024 at 8:51 PM Ed Maste <emaste@freebsd.org> wrote:

> The branch main has been updated by emaste:
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=fbd156d78fbdc5e1984afe4d83436b624e7a1f01
>
> commit fbd156d78fbdc5e1984afe4d83436b624e7a1f01
> Author:     Ed Maste <emaste@FreeBSD.org>
> AuthorDate: 2024-01-25 03:49:45 +0000
> Commit:     Ed Maste <emaste@FreeBSD.org>
> CommitDate: 2024-01-25 03:50:49 +0000
>
>     Revert "nl_types.h: explicitly include cdefs.h"
>
>     This isn't the right approach for addressing this cross-build issue.
>
>     This reverts commit 820401bf176996e41091d2e4190aded12a966b1d.
> ---
>  include/nl_types.h | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/include/nl_types.h b/include/nl_types.h
> index 6ba15132126d..120d1911631f 100644
> --- a/include/nl_types.h
> +++ b/include/nl_types.h
> @@ -34,7 +34,6 @@
>  #ifndef _NL_TYPES_H_
>  #define _NL_TYPES_H_
>
> -#include <sys/cdefs.h>
>  #include <sys/types.h>
>
>  #ifdef _NLS_PRIVATE
>

[-- Attachment #2 --]
<div dir="ltr"><div>Thanks Ed...</div><div><br></div><div>I think that</div><div><br></div><div>diff --git a/tools/build/cross-build/include/linux/sys/types.h b/tools/build/cross-build/include/linux/sys/types.h<br>index 770b3057f8a8..e72e1419bccd 100644<br>--- a/tools/build/cross-build/include/linux/sys/types.h<br>+++ b/tools/build/cross-build/include/linux/sys/types.h<br>@@ -35,6 +35,11 @@<br>  */<br> #pragma once<br> <br>+/*<br>+ * FreeBSD&#39;s types.h always includes sys/cdefs.h, but Linux headers often don&#39;t.<br>+ */<br>+#include &lt;sys/cdefs.h&gt;<br>+<br> #include_next &lt;sys/types.h&gt;<br> <br> #ifndef __size_t</div><div><br></div><div>will filx the problem, but I can&#39;t test things easily enough.</div><div><br></div><div>Warner<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 24, 2024 at 8:51 PM Ed Maste &lt;<a href="mailto:emaste@freebsd.org">emaste@freebsd.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The branch main has been updated by emaste:<br>
<br>
URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=fbd156d78fbdc5e1984afe4d83436b624e7a1f01" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=fbd156d78fbdc5e1984afe4d83436b624e7a1f01</a><br>;
<br>
commit fbd156d78fbdc5e1984afe4d83436b624e7a1f01<br>
Author:     Ed Maste &lt;emaste@FreeBSD.org&gt;<br>
AuthorDate: 2024-01-25 03:49:45 +0000<br>
Commit:     Ed Maste &lt;emaste@FreeBSD.org&gt;<br>
CommitDate: 2024-01-25 03:50:49 +0000<br>
<br>
    Revert &quot;nl_types.h: explicitly include cdefs.h&quot;<br>
<br>
    This isn&#39;t the right approach for addressing this cross-build issue.<br>
<br>
    This reverts commit 820401bf176996e41091d2e4190aded12a966b1d.<br>
---<br>
 include/nl_types.h | 1 -<br>
 1 file changed, 1 deletion(-)<br>
<br>
diff --git a/include/nl_types.h b/include/nl_types.h<br>
index 6ba15132126d..120d1911631f 100644<br>
--- a/include/nl_types.h<br>
+++ b/include/nl_types.h<br>
@@ -34,7 +34,6 @@<br>
 #ifndef _NL_TYPES_H_<br>
 #define _NL_TYPES_H_<br>
<br>
-#include &lt;sys/cdefs.h&gt;<br>
 #include &lt;sys/types.h&gt;<br>
<br>
 #ifdef _NLS_PRIVATE<br>
</blockquote></div>
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfp8MNbMYaP7YtyW9yVZ=hWnEn7ncvwQ9zJa1FM0sCbREw>