From 3c9d0b604c6eaaaae857c900204cf85f99d58b82 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Thu, 19 Apr 2012 14:03:26 +0200 Subject: [PATCH] Compilation fix for system not providing OOM_SCORE_ADJ_MIN Newer systems do not provide a definition for OOM_SCORE_ADJ_MIN, so we need to test against this. Signed-off-by: Hannes Reinecke --- multipathd/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/multipathd/main.c b/multipathd/main.c index f7625ca..69cef3c 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1504,9 +1504,15 @@ setscheduler (void) static void set_oom_adj (void) { +#ifdef OOM_SCORE_ADJ_MIN int retry = 1; char *file = "/proc/self/oom_score_adj"; int score = OOM_SCORE_ADJ_MIN; +#else + int retry = 0; + char *file = "/proc/self/oom_adj"; + int score = OOM_ADJUST_MIN; +#endif FILE *fp; struct stat st; -- 2.34.1