Additional platform target added to build system, with similar
build options to Linux but ultimately making BSD syscalls (and
hence leveragin the existing FreeBSD port in places too).
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Nathan Scott <nathans@debian.org>
Signed-off-by: Nathan Scott <nathans@debian.org>
PCFLAGS = -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 $(GCCFLAGS)
DEPENDFLAGS = -D__linux__
endif
+ifeq ($(PKG_PLATFORM),gnukfreebsd)
+PCFLAGS = -D_GNU_SOURCE $(GCCFLAGS)
+endif
ifeq ($(PKG_PLATFORM),darwin)
PCFLAGS = -traditional-cpp $(GCCFLAGS)
DEPENDFLAGS = -D__APPLE__
#include <xfs/linux.h>
#elif defined(__FreeBSD__)
#include <xfs/freebsd.h>
+#elif defined(__FreeBSD_kernel__)
+#include <xfs/gnukfreebsd.h>
#elif defined(__APPLE__)
#include <xfs/darwin.h>
#elif defined(__sgi__) || defined(__sgi)
int
platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
{
- struct stat st;
+ struct stat64 st;
int cnt, i;
struct statfs *fsinfo;
if (!s) {
- if (stat(block, &st) < 0)
+ if (stat64(block, &st) < 0)
return 0;
s = &st;
}
test -z "$DISTRIBUTION" || pkg_distribution="$DISTRIBUTION"
AC_SUBST(pkg_distribution)
- pkg_platform=`uname -s | tr 'A-Z' 'a-z' | sed -e 's/irix64/irix/'`
+ pkg_platform=`uname -s | tr 'A-Z' 'a-z' | tr -d / | sed -e 's/irix64/irix/'`
test -z "$PLATFORM" || pkg_platform="$PLATFORM"
AC_SUBST(pkg_platform)
])