From f9b925f21c4f7221d7ea601b64e8310842c73435 Mon Sep 17 00:00:00 2001 From: Vita Batrla Date: Fri, 7 Jun 2019 10:28:14 +0200 Subject: [PATCH] Fix implicit function declaration: rindex on Solaris Compilation on reports warning: "auth_mellon_diagnostics.c", line 188: warning: implicit function declaration: rindex "auth_mellon_diagnostics.c", line 188: warning: improper pointer/integer combination: op "=" And binary dumps core, because rindex() is assumed to be integer type, so compiler sign extends its return value and then uses the number as pointer: am_diag_cond_str+0x154: call -0x1e119 am_diag_cond_str+0x159: movslq %eax,%rax am_diag_cond_str+0x15c: testq %rax,%rax am_diag_cond_str+0x15f: je +0x7 am_diag_cond_str+0x161: movb $0x5d,(%rax) <- SIGSEGV Fixes issue #207. --- auth_mellon.h | 1 + 1 file changed, 1 insertion(+) diff --git a/auth_mellon.h b/auth_mellon.h index 73aa230..2b6eb7c 100644 --- a/auth_mellon.h +++ b/auth_mellon.h @@ -25,6 +25,7 @@ #include "config.h" #include +#include #include #include