Including stdlib.h breaks my program in overlay mode
Environment:
- LibreSSL 3.1
- Linux 4.9.0-12-amd64 #1 (closed) SMP Debian 4.9.210-1 (2020-01-20) x86_64 GNU/Linux
Attempting to build an object file from my C99 source:
c99 -std=c99 -pedantic -Wall -Wextra -Wshadow -D_POSIX_C_SOURCE=200809L -g -isystem /usr/include/bsd -DLIBBSD_OVERLAY -I/usr/local/include -c -o config.o config.c
In file included from config.c:3:0:
/usr/include/bsd/stdlib.h:52:27: error: unknown type name ‘u_char’
void arc4random_addrandom(u_char *dat, int datlen);
^~~~~~
It looks like u_char
is a BSDism from sys/types.h
, perhaps you should include that header from stdlib.h
.