Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libgcrypt: fix musl build
@ 2022-03-16 20:37 Fabrice Fontaine
  2022-03-16 21:38 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-03-16 20:37 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Fix the following musl build failure raised since bump to version 1.10.0
in commit d96b9ed0738bae270c479bdaf21eebd4c1f9930d:

In file included from ./jitterentropy.h:98,
                 from ./jitterentropy-base.c:32,
                 from ./rndjent.c:88:
./jitterentropy-base-user.h: In function 'jent_get_cachesize':
./jitterentropy-base-user.h:191:8: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration]
  191 |   fd = open(file, O_RDONLY);
      |        ^~~~
      |        popen
./jitterentropy-base-user.h:191:19: error: 'O_RDONLY' undeclared (first use in this function)
  191 |   fd = open(file, O_RDONLY);
      |                   ^~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/f6182fca6a4e2ba29a89f770f17df691d7861f8d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...entropy-Include-fcntl-h-and-limits-h.patch | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 package/libgcrypt/0002-jitterentropy-Include-fcntl-h-and-limits-h.patch

diff --git a/package/libgcrypt/0002-jitterentropy-Include-fcntl-h-and-limits-h.patch b/package/libgcrypt/0002-jitterentropy-Include-fcntl-h-and-limits-h.patch
new file mode 100644
index 0000000000..8f76f24c64
--- /dev/null
+++ b/package/libgcrypt/0002-jitterentropy-Include-fcntl-h-and-limits-h.patch
@@ -0,0 +1,38 @@
+From ffaef0be613121d3ee37867d82932a7a30c2bc6d Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Thu, 3 Feb 2022 22:46:41 +0000
+Subject: [PATCH] jitterentropy: Include <fcntl.h> and <limits.h>
+
+* random/jitterentropy-base-user.h: Include <fcntl.h> for O_RDONLY
+* random/jitterentropy-base-user.h: Include <limits.h> for LONG_MAX
+
+--
+
+Fixes the build with musl libc.
+
+Signed-off-by: Heiko Becker <heirecka@exherbo.org>
+
+[Retrieved from:
+https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=ffaef0be613121d3ee37867d82932a7a30c2bc6d]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ random/jitterentropy-base-user.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/random/jitterentropy-base-user.h b/random/jitterentropy-base-user.h
+index 326dfbed..389106ff 100644
+--- a/random/jitterentropy-base-user.h
++++ b/random/jitterentropy-base-user.h
+@@ -39,6 +39,9 @@
+  * DAMAGE.
+  */
+ 
++#include <fcntl.h>
++#include <limits.h>
++
+ #ifndef GCRYPT_JITTERENTROPY_BASE_USER_H
+ #define GCRYPT_JITTERENTROPY_BASE_USER_H
+ 
+-- 
+2.11.0
+
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/libgcrypt: fix musl build
  2022-03-16 20:37 [Buildroot] [PATCH 1/1] package/libgcrypt: fix musl build Fabrice Fontaine
@ 2022-03-16 21:38 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2022-03-16 21:38 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

Fabrice, All,

On 2022-03-16 21:37 +0100, Fabrice Fontaine spake thusly:
> Fix the following musl build failure raised since bump to version 1.10.0
> in commit d96b9ed0738bae270c479bdaf21eebd4c1f9930d:
> 
> In file included from ./jitterentropy.h:98,
>                  from ./jitterentropy-base.c:32,
>                  from ./rndjent.c:88:
> ./jitterentropy-base-user.h: In function 'jent_get_cachesize':
> ./jitterentropy-base-user.h:191:8: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration]
>   191 |   fd = open(file, O_RDONLY);
>       |        ^~~~
>       |        popen
> ./jitterentropy-base-user.h:191:19: error: 'O_RDONLY' undeclared (first use in this function)
>   191 |   fd = open(file, O_RDONLY);
>       |                   ^~~~~~~~
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/f6182fca6a4e2ba29a89f770f17df691d7861f8d
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  ...entropy-Include-fcntl-h-and-limits-h.patch | 38 +++++++++++++++++++
>  1 file changed, 38 insertions(+)
>  create mode 100644 package/libgcrypt/0002-jitterentropy-Include-fcntl-h-and-limits-h.patch
> 
> diff --git a/package/libgcrypt/0002-jitterentropy-Include-fcntl-h-and-limits-h.patch b/package/libgcrypt/0002-jitterentropy-Include-fcntl-h-and-limits-h.patch
> new file mode 100644
> index 0000000000..8f76f24c64
> --- /dev/null
> +++ b/package/libgcrypt/0002-jitterentropy-Include-fcntl-h-and-limits-h.patch
> @@ -0,0 +1,38 @@
> +From ffaef0be613121d3ee37867d82932a7a30c2bc6d Mon Sep 17 00:00:00 2001
> +From: Heiko Becker <heirecka@exherbo.org>
> +Date: Thu, 3 Feb 2022 22:46:41 +0000
> +Subject: [PATCH] jitterentropy: Include <fcntl.h> and <limits.h>
> +
> +* random/jitterentropy-base-user.h: Include <fcntl.h> for O_RDONLY
> +* random/jitterentropy-base-user.h: Include <limits.h> for LONG_MAX
> +
> +--
> +
> +Fixes the build with musl libc.
> +
> +Signed-off-by: Heiko Becker <heirecka@exherbo.org>
> +
> +[Retrieved from:
> +https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=ffaef0be613121d3ee37867d82932a7a30c2bc6d]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + random/jitterentropy-base-user.h | 3 +++
> + 1 file changed, 3 insertions(+)
> +
> +diff --git a/random/jitterentropy-base-user.h b/random/jitterentropy-base-user.h
> +index 326dfbed..389106ff 100644
> +--- a/random/jitterentropy-base-user.h
> ++++ b/random/jitterentropy-base-user.h
> +@@ -39,6 +39,9 @@
> +  * DAMAGE.
> +  */
> + 
> ++#include <fcntl.h>
> ++#include <limits.h>
> ++
> + #ifndef GCRYPT_JITTERENTROPY_BASE_USER_H
> + #define GCRYPT_JITTERENTROPY_BASE_USER_H
> + 
> +-- 
> +2.11.0
> +
> -- 
> 2.35.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-16 21:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-16 20:37 [Buildroot] [PATCH 1/1] package/libgcrypt: fix musl build Fabrice Fontaine
2022-03-16 21:38 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox