]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
flex: fix build with gcc-15 on host
authorMartin Jansa <martin.jansa@gmail.com>
Mon, 20 Oct 2025 14:37:59 +0000 (16:37 +0200)
committerSteve Sakoman <steve@sakoman.com>
Fri, 24 Oct 2025 13:41:43 +0000 (06:41 -0700)
commitc13635db898146de4935c8c1c5e61cd732fa694e
treefdc132ea22be4dbd84c1ceede815f2158b7145f5
parentae89d0c2ca49c40429f787577d280b5886f42cc1
flex: fix build with gcc-15 on host

* fixes:
  http://errors.yoctoproject.org/Errors/Details/853017/

../../flex-2.6.4/src/../lib/malloc.c:6:12: warning: conflicting types for built-in function ‘malloc’; expected ‘void *(long unsigned int)’ [-Wbuiltin-declaration-mismatch]
    6 |      void *malloc ();
      |            ^~~~~~
../../flex-2.6.4/src/../lib/malloc.c:5:1: note: ‘malloc’ is declared in header ‘<stdlib.h>’
    4 |      #include <sys/types.h>
  +++ |+#include <stdlib.h>
    5 |
../../flex-2.6.4/src/../lib/malloc.c: In function ‘rpl_malloc’:
../../flex-2.6.4/src/../lib/malloc.c:16:15: error: too many arguments to function ‘malloc’; expected 0, have 1
   16 |        return malloc (n);
      |               ^~~~~~  ~
../../flex-2.6.4/src/../lib/malloc.c:6:12: note: declared here
    6 |      void *malloc ();
      |            ^~~~~~
make[2]: *** [Makefile:1431: ../lib/stage1flex-malloc.o] Error 1

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-devtools/flex/flex/0001-Match-malloc-signature-to-its-use.patch [new file with mode: 0644]
meta/recipes-devtools/flex/flex_2.6.4.bb