Bug#989235: p11-kit FTBFS on hurd-any

Jeffrey Walton noloader at gmail.com
Sun May 30 18:51:34 BST 2021


On Sun, May 30, 2021 at 9:22 AM Helmut Grohne <helmut at subdivi.de> wrote:
>
> On Sat, May 29, 2021 at 06:17:09PM -0400, Jeffrey Walton wrote:
> > On Sat, May 29, 2021 at 5:00 PM Helmut Grohne <helmut at subdivi.de> wrote:
> > > ...
> > > p11-kit fails to build from source on hurd-any. The immediate reason is
> > > an undefined macro SIZE_MAX in p11-kit/lists.c. It happens that this
> > > file fails to #include <stdint.h>, which is generally required for
> > > SIZE_MAX. I'm attaching a patch for this.
> >
> > There are different philosophies about SIZE_MAX. The one that wins on
> > Hurd is, SIZE_MAX is a vulnerability.
> >
> > Also see https://lists.debian.org/debian-hurd/2021/04/msg00045.html.
>
> Could it be that you are confusing PATH_MAX and SIZE_MAX?

Oh, you're right. My bad.

Here's the patch I use for missing SIZE_MAX
(https://github.com/noloader/Build-Scripts/blob/master/patch/p11kit.patch).
I believe it works with HURD also.

--- p11-kit/lists.c
+++ p11-kit/lists.c
@@ -43,12 +43,21 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <limits.h>

 #include "message.h"
 #include "p11-kit.h"
 #include "tool.h"
 #include "uri.h"

+#ifndef SIZE_MAX
+# ifdef SIZE_T_MAX
+#  define SIZE_MAX SIZE_T_MAX
+# else
+#  define SIZE_MAX MAX_SIZE
+# endif
+#endif
+
 int p11_kit_list_modules (int argc,
                           char *argv[]);

Jeff



More information about the Pkg-gnutls-maint mailing list