Fix build errors and warnings for OpenBSD

This commit is contained in:
Lassi Kortela 2019-08-09 20:20:17 +03:00
parent b7b4269455
commit 10ffed569e
5 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,4 @@
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@ -101,6 +102,8 @@ char *get_exename(char *buf, size_t size)
char *p, *path, *pathcpy, filename[PATH_MAX];
struct stat sbuf;
(void)size;
pid = getpid();
mib[0] = CTL_KERN;

View File

@ -1,3 +1,4 @@
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

View File

@ -1,3 +1,5 @@
#include <sys/select.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

View File

@ -13,8 +13,6 @@
A UTF-8 validation routine is included.
*/
#define _XOPEN_SOURCE 700
#include <assert.h>
#include <stdarg.h>
#include <stddef.h>

View File

@ -2,7 +2,7 @@
set -eu
CC="${CC:-clang}"
CFLAGS="-Wall -Wextra -Wno-strict-aliasing -std=gnu99"
CFLAGS="$CFLAGS -O2 -falign-functions"
CFLAGS="$CFLAGS -O2" # -falign-functions
CFLAGS="$CFLAGS -I ../c -D NDEBUG -D USE_COMPUTED_GOTO"
LFLAGS="-lm"
builddir="build-$(uname | tr A-Z- a-z_)-$(uname -m | tr A-Z- a-z_)"