use/added "ext2fs.h" header to bypass problems of 2.6 kernel headers (no __u64 with...
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Tue, 18 Nov 2003 22:31:29 +0000 (22:31 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Tue, 18 Nov 2003 22:31:29 +0000 (22:31 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/branches/SYSCALL_SWITCH@403 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/src/Makefile-files
util-vserver/src/ext2fs.h [new file with mode: 0644]
util-vserver/src/showattr.c
util-vserver/src/vutil.cc

index f779504..9a7ae12 100644 (file)
@@ -17,7 +17,8 @@
 ## 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 \
diff --git a/util-vserver/src/ext2fs.h b/util-vserver/src/ext2fs.h
new file mode 100644 (file)
index 0000000..6213185
--- /dev/null
@@ -0,0 +1,30 @@
+// $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
index 7e63289..daaf7a6 100644 (file)
 // 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
index b41c3f2..efd8465 100644 (file)
 // 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>
@@ -28,7 +36,9 @@
 #include <utime.h>
 #include "vutil.h"
 #include <sys/ioctl.h>
-#include <linux/ext2_fs.h>
+
+#include "ext2fs.h"
+
 
 bool testmode;
 int debug;