diff options
author | Omar Polo <op@omarpolo.com> | 2021-10-07 11:36:25 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-10-07 11:36:25 +0000 |
commit | 492a274fd712e4589669254be327897868e44812 (patch) | |
tree | d39c2374afac8475e3a70414d02e188c2ea4cfeb /configure | |
parent | 207b3e80d867693ff74cf99c84f7dd41386adba1 (diff) |
add compat for sys/tree.h
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -254,6 +254,7 @@ runtest setproctitle SETPROCTITLE || true runtest strlcat STRLCAT || true runtest strlcpy STRLCPY || true runtest strtonum STRTONUM || true +runtest tree_h TREE_H || true runtest vasprintf VASPRINTF "" -D_GNU_SOURCE || true if [ ${HAVE_LIBTLS} -eq 0 ]; then @@ -274,7 +275,7 @@ if [ ${HAVE_LIBEVENT} -eq 0 ]; then exit 1 fi -if [ ${HAVE_QUEUE_H} -eq 0 -o ${HAVE_IMSG} -eq 0 ]; then +if [ ${HAVE_QUEUE_H} -eq 0 -o ${HAVE_IMSG} -eq 0 -o ${HAVE_TREE_H} -eq 0 ]; then CFLAGS="${CFLAGS} -I ${PWD}/compat" fi @@ -302,6 +303,12 @@ else echo "#include <queue.h>" fi +if [ ${HAVE_TREE_H} -eq 1 ]; then + echo "#include <sys/tree.h>" +else + echo "#include <tree.h>" +fi + echo "#include <sys/types.h>" echo "#include <sys/uio.h>" echo "#include <stdint.h>" @@ -331,6 +338,7 @@ cat <<__HEREDOC__ #define HAVE_STRLCAT ${HAVE_STRLCAT} #define HAVE_STRLCPY ${HAVE_STRLCPY} #define HAVE_STRTONUM ${HAVE_STRTONUM} +#define HAVE_TREE_H ${HAVE_TREE_H} #define HAVE_VASPRINTF ${HAVE_VASPRINTF} __HEREDOC__ |