FreeBSD compat

Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Chris Rees
2011-01-24 17:07:06 +01:00
committed by Denys Vlasenko
parent e3c127d846
commit 330718ef55
2 changed files with 12 additions and 6 deletions

View File

@ -38,12 +38,6 @@
#include <time.h>
#include <unistd.h>
#include <sys/param.h>
#ifndef HAVE_CLEARENV
# define clearenv() do { if (environ) environ[0] = NULL; } while (0)
#endif
#ifndef HAVE_FDATASYNC
# define fdatasync fsync
#endif
#ifdef HAVE_MNTENT_H
# include <mntent.h>
#endif
@ -103,6 +97,15 @@
typedef unsigned socklen_t;
# endif
#endif
#ifndef HAVE_CLEARENV
# define clearenv() do { if (environ) environ[0] = NULL; } while (0)
#endif
#ifndef HAVE_FDATASYNC
# define fdatasync fsync
#endif
#ifndef HAVE_XTABS
# define XTABS TAB3
#endif
/* Some libc's forget to declare these, do it ourself */