[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
devel branch fails to build when using bash malloc due to missing errno.
From: |
Eduardo A . Bustamante López |
Subject: |
devel branch fails to build when using bash malloc due to missing errno.h include |
Date: |
Thu, 3 Nov 2016 22:17:22 -0600 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
I'm running configure with the following flags:
| ./configure CC=gcc-6
The error I get while building:
| make[1]: Entering directory '/home/dualbus/local/src/gnu/bash/lib/malloc'
| gcc-6 -I. -I../.. -I../.. -I../../include -I../../lib -DHAVE_CONFIG_H
-DSHELL -Wall -g -ggdb -O0 -Wno-parentheses -Wno-format-security -DRCHECK
-Dbotch=programming_error -DMALLOC_DEBUG -c malloc.c
| malloc.c: In function ‘xsplit’:
| malloc.c:472:21: warning: unused variable ‘split_max’ [-Wunused-variable]
| int nbuck, nblks, split_max;
| ^~~~~~~~~
| malloc.c: In function ‘posix_memalign’:
| malloc.c:1143:12: error: ‘EINVAL’ undeclared (first use in this function)
| return EINVAL;
| ^~~~~~
| malloc.c:1143:12: note: each undeclared identifier is reported only once
for each function it appears in
| malloc.c:1153:10: error: ‘ENOMEM’ undeclared (first use in this function)
| return ENOMEM;
| ^~~~~~
| malloc.c:1154:1: warning: control reaches end of non-void function
[-Wreturn-type]
| }
| ^
| At top level:
| malloc.c:669:1: warning: ‘malloc_debug_dummy’ defined but not used
[-Wunused-function]
| malloc_debug_dummy ()
| ^~~~~~~~~~~~~~~~~~
| Makefile:62: recipe for target 'malloc.o' failed
| make[1]: *** [malloc.o] Error 1
| make[1]: Leaving directory '/home/dualbus/local/src/gnu/bash/lib/malloc'
| Makefile:399: recipe for target 'lib/malloc/libmalloc.a' failed
| make: *** [lib/malloc/libmalloc.a] Error 1
This is fixed by adding an errno.h include inside lib/malloc/malloc.c
--
Eduardo Bustamante
https://dualbus.me/
- devel branch fails to build when using bash malloc due to missing errno.h include,
Eduardo A . Bustamante López <=