From f2857f14b1763940c71c0fa849c808b9ae5d3373 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sat, 29 Aug 2009 19:16:49 +0200 Subject: [PATCH] Patched error at exit of smartmontools --- lfs/smartmontools | 4 +++- .../smartmontools-5.39-error_throw_int.patch | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/patches/smartmontools-5.39-error_throw_int.patch diff --git a/lfs/smartmontools b/lfs/smartmontools index 17e6330c3d..34cf5659b9 100644 --- a/lfs/smartmontools +++ b/lfs/smartmontools @@ -70,8 +70,10 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/smartmontools-5.39-error_throw_int.patch + cd $(DIR_APP) && ./autogen.sh cd $(DIR_APP) && ./configure --prefix=/usr - cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && make BUILD_INFO='"($(NAME) $(VERSION))"' $(MAKETUNING) cd $(DIR_APP) && make install @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/src/patches/smartmontools-5.39-error_throw_int.patch b/src/patches/smartmontools-5.39-error_throw_int.patch new file mode 100644 index 0000000000..5ed4b10993 --- /dev/null +++ b/src/patches/smartmontools-5.39-error_throw_int.patch @@ -0,0 +1,16 @@ +diff -Naur smartmontools-5.39-svn_r2877/utility.h smartmontools-5.39-svn_r2877.new/utility.h +--- smartmontools-5.39-svn_r2877/utility.h 2009-08-24 12:48:50.000000000 +0200 ++++ smartmontools-5.39-svn_r2877.new/utility.h 2009-08-29 09:11:07.000000000 +0200 +@@ -102,7 +102,11 @@ + + // Replacement for exit(status) + // (exit is not compatible with C++ destructors) +-#define EXIT(status) { throw (int)(status); } ++ ++//This doesn't work on IPFire. ++//#define EXIT(status) { throw (int)(status); } ++//tried to use exit and found no problems yet ++#define EXIT(status) { exit ((int)(status)); } + + + #ifdef OLD_INTERFACE -- 2.39.2