From daa1be889fdaa24ccd3ec683cbe70b446dc9c450 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Tue, 18 Nov 2003 22:31:29 +0000 Subject: [PATCH] use/added "ext2fs.h" header to bypass problems of 2.6 kernel headers (no __u64 with '--std=c99') 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 | 3 ++- util-vserver/src/ext2fs.h | 30 ++++++++++++++++++++++++++++++ util-vserver/src/showattr.c | 9 ++++++++- util-vserver/src/vutil.cc | 12 +++++++++++- 4 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 util-vserver/src/ext2fs.h diff --git a/util-vserver/src/Makefile-files b/util-vserver/src/Makefile-files index f779504..9a7ae12 100644 --- a/util-vserver/src/Makefile-files +++ b/util-vserver/src/Makefile-files @@ -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 index 0000000..6213185 --- /dev/null +++ b/util-vserver/src/ext2fs.h @@ -0,0 +1,30 @@ +// $Id$ --*- c -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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 +#elif defined(HAVE_LINUX_EXT2_FS_H) +# include +#else +# error Do not know how to include +#endif + +#endif // H_UTIL_VSERVER_SRC_EXT2FS_H diff --git a/util-vserver/src/showattr.c b/util-vserver/src/showattr.c index 7e63289..daaf7a6 100644 --- a/util-vserver/src/showattr.c +++ b/util-vserver/src/showattr.c @@ -17,13 +17,20 @@ // 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 +#endif +#include "compat.h" + #include #include #include #include #include #include -#include + +#include "ext2fs.h" + // Patch to help compile this utility on unpatched kernel source #ifndef EXT2_IMMUTABLE_FILE_FL diff --git a/util-vserver/src/vutil.cc b/util-vserver/src/vutil.cc index b41c3f2..efd8465 100644 --- a/util-vserver/src/vutil.cc +++ b/util-vserver/src/vutil.cc @@ -18,6 +18,14 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma implementation + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#undef PACKAGE + #include #include #include @@ -28,7 +36,9 @@ #include #include "vutil.h" #include -#include + +#include "ext2fs.h" + bool testmode; int debug; -- 1.8.1.5