## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
-src_HDRS = src/vutil.h src/vutil.p
+src_HDRS = src/vutil.h src/vutil.p \
+ src/ext2fs.h
src_pkglib_SCRPTS = src/setattr
src_pkglib_PRGS = src/capchroot \
--- /dev/null
+// $Id$ --*- c -*--
+
+// Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+#ifndef H_UTIL_VSERVER_SRC_EXT2FS_H
+#define H_UTIL_VSERVER_SRC_EXT2FS_H
+
+#ifdef HAVE_EXT2FS_EXT2FS_H
+# include <ext2fs/ext2fs.h>
+#elif defined(HAVE_LINUX_EXT2_FS_H)
+# include <linux/ext2_fs.h>
+#else
+# error Do not know how to include <ext2_fs.h>
+#endif
+
+#endif // H_UTIL_VSERVER_SRC_EXT2FS_H
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#include "compat.h"
+
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
-#include <linux/ext2_fs.h>
+
+#include "ext2fs.h"
+
// Patch to help compile this utility on unpatched kernel source
#ifndef EXT2_IMMUTABLE_FILE_FL
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma implementation
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#include "compat.h"
+
+#undef PACKAGE
+
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <utime.h>
#include "vutil.h"
#include <sys/ioctl.h>
-#include <linux/ext2_fs.h>
+
+#include "ext2fs.h"
+
bool testmode;
int debug;