that I make stupid fundamental mistakes like this when I don't.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/file.h>
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
+#include <unistd.h>
+
+#include <libutil.h>
int
flopen(const char *path, int flags, ...)
const char * const *_more_white);
int extattr_namespace_to_string(int _attrnamespace, char **_string);
int extattr_string_to_namespace(const char *_string, int *_attrnamespace);
-int flopen(const char *_path, int _flags, mode_t _mode);
+int flopen(const char *_path, int _flags, ...);
void login(struct utmp *_ut);
int login_tty(int _fd);
int logout(const char *_line);