Discussion:
[PATCH] disable out_of_memory() only for DISABLE_TRYCATCH builds
Sergey Senozhatsky
2012-04-29 09:58:37 UTC
Permalink
| commit ce39e2528d1fcd110cae928f55a39148059283b5
| Author: John Mathew <johnx.mathew-***@public.gmane.org>
| Date: Thu Jun 30 09:58:34 2011 +0300
|
| misc changes needed to build powertop natively

commented out_of_memory() handler.
disable it only for DISABLE_TRYCATCH allowing native powertop build.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky-***@public.gmane.org>

---

src/main.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 77e6d05..0bf0153 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -276,11 +276,13 @@ int main(int argc, char **argv)
int option_index;
int c;
bool wantreport = FALSE;
- char filename[4096];;
+ char filename[4096];
int iterations = 1;
struct statfs st_fs;

- //set_new_handler(out_of_memory);
+#ifndef DISABLE_TRYCATCH
+ set_new_handler(out_of_memory);
+#endif

setlocale (LC_ALL, "");
#ifndef DISABLE_I18N

Loading...