fi
if [ "$STRLCPY" = no ]; then
echo "COMPAT_SRCS+= compat/strlcpy.c" >>$CONFIG_MK
- echo "#include \"compat/strlcpy.h\"" >>$CONFIG_H
+ echo "#include \"compat/strlcpy.h\"" >>$CONFIG_H
fi
if [ -z "$TAILQ_FOREACH_SAFE" ]; then
fi
if [ "$POSIX_SPAWN" = no ]; then
echo "COMPAT_SRCS+= compat/posix_spawn.c" >>$CONFIG_MK
- echo "#include \"compat/posix_spawn.h\"" >>$CONFIG_H
else
- echo "#include <spawn.h>" >>$CONFIG_H
+ echo "#define HAVE_SPAWN_H" >>$CONFIG_H
fi
if [ -z "$POLLTS" ]; then
yes)
;;
ppoll)
- echo "#define pollts ppoll" >>$CONFIG_H
+ echo "#define pollts ppoll" >>$CONFIG_H
;;
pselect)
echo "COMPAT_SRCS+= compat/pselect.c" >>$CONFIG_MK
- echo "#include \"compat/pollts.h\"" >>$CONFIG_H
+ echo "#include \"compat/pollts.h\"" >>$CONFIG_H
;;
*)
echo "COMPAT_SRCS+= compat/pollts.c" >>$CONFIG_MK
- echo "#include \"compat/pollts.h\"" >>$CONFIG_H
+ echo "#include \"compat/pollts.h\"" >>$CONFIG_H
;;
esac
#include "net.h"
#include "script.h"
+#ifdef HAVE_SPAWN_H
+#include <spawn.h>
+#else
+#include "compat/posix_spawn.h"
+#endif
+
#define DEFAULT_PATH "PATH=/usr/bin:/usr/sbin:/bin:/sbin"
static const char * const if_params[] = {