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>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000030a393060fbde35b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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=E2=80=AFPM Ed Maste <emaste@freebsd.org> wrote=
:

> The branch main has been updated by emaste:
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=3Dfbd156d78fbdc5e1984afe4d83436b6=
24e7a1f01
>
> 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
>

--00000000000030a393060fbde35b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Thanks Ed...</div><div><br></div><div>I think that</d=
iv><div><br></div><div>diff --git a/tools/build/cross-build/include/linux/s=
ys/types.h b/tools/build/cross-build/include/linux/sys/types.h<br>index 770=
b3057f8a8..e72e1419bccd 100644<br>--- a/tools/build/cross-build/include/lin=
ux/sys/types.h<br>+++ b/tools/build/cross-build/include/linux/sys/types.h<b=
r>@@ -35,6 +35,11 @@<br>=C2=A0 */<br>=C2=A0#pragma once<br>=C2=A0<br>+/*<br=
>+ * FreeBSD&#39;s types.h always includes sys/cdefs.h, but Linux headers o=
ften don&#39;t.<br>+ */<br>+#include &lt;sys/cdefs.h&gt;<br>+<br>=C2=A0#inc=
lude_next &lt;sys/types.h&gt;<br>=C2=A0<br>=C2=A0#ifndef __size_t</div><div=
><br></div><div>will filx the problem, but I can&#39;t test things easily e=
nough.</div><div><br></div><div>Warner<br></div></div><br><div class=3D"gma=
il_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Jan 24, 2024 at 8:5=
1=E2=80=AFPM Ed Maste &lt;<a href=3D"mailto:emaste@freebsd.org">emaste@free=
bsd.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"=
margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef=
t:1ex">The branch main has been updated by emaste:<br>
<br>
URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3Dfbd156d78fbdc5e19=
84afe4d83436b624e7a1f01" rel=3D"noreferrer" target=3D"_blank">https://cgit.=
FreeBSD.org/src/commit/?id=3Dfbd156d78fbdc5e1984afe4d83436b624e7a1f01</a><b=
r>
<br>
commit fbd156d78fbdc5e1984afe4d83436b624e7a1f01<br>
Author:=C2=A0 =C2=A0 =C2=A0Ed Maste &lt;emaste@FreeBSD.org&gt;<br>
AuthorDate: 2024-01-25 03:49:45 +0000<br>
Commit:=C2=A0 =C2=A0 =C2=A0Ed Maste &lt;emaste@FreeBSD.org&gt;<br>
CommitDate: 2024-01-25 03:50:49 +0000<br>
<br>
=C2=A0 =C2=A0 Revert &quot;nl_types.h: explicitly include cdefs.h&quot;<br>
<br>
=C2=A0 =C2=A0 This isn&#39;t the right approach for addressing this cross-b=
uild issue.<br>
<br>
=C2=A0 =C2=A0 This reverts commit 820401bf176996e41091d2e4190aded12a966b1d.=
<br>
---<br>
=C2=A0include/nl_types.h | 1 -<br>
=C2=A01 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>
=C2=A0#ifndef _NL_TYPES_H_<br>
=C2=A0#define _NL_TYPES_H_<br>
<br>
-#include &lt;sys/cdefs.h&gt;<br>
=C2=A0#include &lt;sys/types.h&gt;<br>
<br>
=C2=A0#ifdef _NLS_PRIVATE<br>
</blockquote></div>

--00000000000030a393060fbde35b--



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