coredump: Don't compile flat_core_dump when coredumps are disabled
[sfrench/cifs-2.6.git] / fs / binfmt_flat.c
index 208cdce16de1b1643be373e87aa732fa776af1a2..6268981500112fd3cc20350649ceb9c4c878d3b5 100644 (file)
@@ -98,7 +98,9 @@ static int load_flat_shared_library(int id, struct lib_info *p);
 #endif
 
 static int load_flat_binary(struct linux_binprm *);
+#ifdef CONFIG_COREDUMP
 static int flat_core_dump(struct coredump_params *cprm);
+#endif
 
 static struct linux_binfmt flat_format = {
        .module         = THIS_MODULE,
@@ -115,12 +117,14 @@ static struct linux_binfmt flat_format = {
  * Currently only a stub-function.
  */
 
+#ifdef CONFIG_COREDUMP
 static int flat_core_dump(struct coredump_params *cprm)
 {
        pr_warn("Process %s:%d received signr %d and should have core dumped\n",
                current->comm, current->pid, cprm->siginfo->si_signo);
        return 1;
 }
+#endif
 
 /****************************************************************************/
 /*