[PATCH] include config.h before system headers in
partutil/partutil.c
Sergey Vlasov
vsu at altlinux.ru
Tue Feb 27 09:20:48 PST 2007
Because partutil/partutil.c was including config.h too late (after
including system headers), "#define _FILE_OFFSET_BITS 64" done there
did not have effect. On 32-bit systems this caused lseek errors and
failure to parse partition tables if extended partitions were present.
Signed-off-by: Sergey Vlasov <vsu at altlinux.ru>
---
This bug might be the underlying reason for hald-probe-storage
crashes when parsing some partition tables (the crash seems to be
fixed in the latest code, but parsing still fails).
Patch applies both to the master and hal-0_5_8-branch (but tested
only with 0.5.8).
partutil/partutil.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/partutil/partutil.c b/partutil/partutil.c
index 36078c0..5a26a62 100644
--- a/partutil/partutil.c
+++ b/partutil/partutil.c
@@ -21,6 +21,10 @@
*
**************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
@@ -38,12 +42,6 @@
#include "../hald/logger.h"
#include "partutil.h"
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-
#ifdef USE_PARTED
#include <parted/parted.h>
#endif
--
1.5.0.1.262.g817772
More information about the hal
mailing list