Fix build errors and warnings for OpenBSD
This commit is contained in:
parent
b7b4269455
commit
10ffed569e
|
@ -1,3 +1,4 @@
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -101,6 +102,8 @@ char *get_exename(char *buf, size_t size)
|
||||||
char *p, *path, *pathcpy, filename[PATH_MAX];
|
char *p, *path, *pathcpy, filename[PATH_MAX];
|
||||||
struct stat sbuf;
|
struct stat sbuf;
|
||||||
|
|
||||||
|
(void)size;
|
||||||
|
|
||||||
pid = getpid();
|
pid = getpid();
|
||||||
|
|
||||||
mib[0] = CTL_KERN;
|
mib[0] = CTL_KERN;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <stdarg.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include <sys/select.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
2
c/utf8.c
2
c/utf8.c
|
@ -13,8 +13,6 @@
|
||||||
A UTF-8 validation routine is included.
|
A UTF-8 validation routine is included.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _XOPEN_SOURCE 700
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
set -eu
|
set -eu
|
||||||
CC="${CC:-clang}"
|
CC="${CC:-clang}"
|
||||||
CFLAGS="-Wall -Wextra -Wno-strict-aliasing -std=gnu99"
|
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"
|
CFLAGS="$CFLAGS -I ../c -D NDEBUG -D USE_COMPUTED_GOTO"
|
||||||
LFLAGS="-lm"
|
LFLAGS="-lm"
|
||||||
builddir="build-$(uname | tr A-Z- a-z_)-$(uname -m | tr A-Z- a-z_)"
|
builddir="build-$(uname | tr A-Z- a-z_)-$(uname -m | tr A-Z- a-z_)"
|
||||||
|
|
Loading…
Reference in New Issue